diff --git a/cps/admin.py b/cps/admin.py index 78416089..bc5198bb 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -55,7 +55,7 @@ feature_support = { try: import rarfile feature_support['rar'] = True -except ImportError: +except (ImportError, SyntaxError): feature_support['rar'] = False try: diff --git a/cps/comic.py b/cps/comic.py index c228454c..7e3c7d47 100644 --- a/cps/comic.py +++ b/cps/comic.py @@ -38,7 +38,7 @@ try: use_comic_meta = True try: from comicapi import __version__ as comic_version - except (ImportError): + except ImportError: comic_version = '' except (ImportError, LookupError) as e: log.debug('Cannot import comicapi, extracting comic metadata will not work: %s', e) @@ -47,7 +47,7 @@ except (ImportError, LookupError) as e: try: import rarfile use_rarfile = True - except ImportError as e: + except (ImportError, SyntaxError) as e: log.debug('Cannot import rarfile, extracting cover files from rar files will not work: %s', e) use_rarfile = False use_comic_meta = False diff --git a/optional-requirements.txt b/optional-requirements.txt index ae35f389..0d670875 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -31,7 +31,7 @@ rarfile>=2.7 # other natsort>=2.2.0,<7.1.0 -git+https://github.com/OzzieIsaacs/comicapi.git@b323fab55e7daba97f90bf59a4bc8de9d9c0a86b#egg=comicapi +git+https://github.com/OzzieIsaacs/comicapi.git@7aa91ea95ea7a919df6c6cac817865434a31c228#egg=comicapi #Kobo integration jsonschema>=3.2.0,<3.3.0