From 2418bfe91bd73df048ad9162fd8fcb734c8c292f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 24 Sep 2016 12:05:45 +0200 Subject: [PATCH] replace JSONDecodeError with ValueError --- gallery_dl/__init__.py | 2 +- gallery_dl/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 8b5702fb..45b815ec 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -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: diff --git a/gallery_dl/config.py b/gallery_dl/config.py index 3f712047..538d6810 100644 --- a/gallery_dl/config.py +++ b/gallery_dl/config.py @@ -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)