diff --git a/check_syncthing b/check_syncthing index 3cad2e9..68ca0d9 100755 --- a/check_syncthing +++ b/check_syncthing @@ -173,6 +173,10 @@ for folder in config["folders"]: share_with = [ devices[dev["deviceID"]] for dev in folder["devices"] if dev["deviceID"] in devices ] + if not share_with: + if args.devices or args.excluded_devices: + continue + share_with = ["no device"] extra_lines.append( f"- {folder['label']} ({folder['path']}, share with {', '.join(share_with)})" ) @@ -209,3 +213,5 @@ else: print(" - ".join(status)) print("\n".join(extra_lines)) sys.exit(exit_status[error_level]) + +# vim: tabstop=4 shiftwidth=4 softtabstop=4 expandtab