mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
replace JSONDecodeError with ValueError
This commit is contained in:
parent
581daebc4b
commit
2418bfe91b
@ -79,7 +79,7 @@ def parse_option(opt):
|
||||
key, value = opt.split("=", 1)
|
||||
try:
|
||||
value = json.loads(value)
|
||||
except json.decoder.JSONDecodeError:
|
||||
except ValueError:
|
||||
pass
|
||||
config.set(key.split("."), value)
|
||||
except ValueError:
|
||||
|
@ -29,7 +29,7 @@ def load(*files, strict=False):
|
||||
if strict:
|
||||
raise
|
||||
continue
|
||||
except json.decoder.JSONDecodeError as exception:
|
||||
except ValueError as exception:
|
||||
print("Error while loading '", path, "':", sep="", file=sys.stderr)
|
||||
print(exception, file=sys.stderr)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user