From 2256df07852fa392c2c633625fd62e29c261d18b Mon Sep 17 00:00:00 2001 From: Fabrizio Pietrucci Date: Sat, 28 May 2022 19:31:12 +0200 Subject: [PATCH] Fix 'slugify' dependency check New versions of slugify moved version informations to a standalone module (__verrsion__.py). Added a check to see if the imported version is indeed a string (as previously expected). If not, get the `__version__` variable in the `__version__` module. --- kindlecomicconverter/shared.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py index 507873b..74a6fe1 100644 --- a/kindlecomicconverter/shared.py +++ b/kindlecomicconverter/shared.py @@ -118,6 +118,8 @@ def dependencyCheck(level): missing.append('psutil 5.0.0+') try: from slugify import __version__ as slugifyVersion + if not isinstance(slugifyVersion, str): + slugifyVersion = slugifyVersion.__version__ if StrictVersion('1.2.1') > StrictVersion(slugifyVersion): missing.append('python-slugify 1.2.1+') except ImportError: