Do not expect combined JSON to be a directory

This commit is contained in:
Kuba Szczodrzyński
2022-12-02 14:24:29 +01:00
parent 36aa2dfae3
commit 7211831bb4

View File

@@ -86,12 +86,8 @@ def __configure_local_device_or_update_firmware(args, update_firmare: bool = Fal
print(f"Configuration file {args.config} does not exist", file=sys.stderr)
sys.exit(10)
if not os.path.exists(args.profile):
print(f"Device profile directory {args.profile} does not exist", file=sys.stderr)
sys.exit(20)
if not os.path.isdir(args.profile):
print(f"Provided device profile path {args.profile} is not a directory", file=sys.stderr)
if not os.path.isfile(args.profile):
print(f"Provided device profile JSON {args.profile} does not exist, or is not a file", file=sys.stderr)
sys.exit(30)
config = DeviceConfig.read(args.config)