1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-09 14:33:19 +00:00

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.
This commit is contained in:
Fabrizio Pietrucci
2022-05-28 19:31:12 +02:00
committed by darodi
parent 378a3caccc
commit 2256df0785
+2
View File
@@ -118,6 +118,8 @@ def dependencyCheck(level):
missing.append('psutil 5.0.0+') missing.append('psutil 5.0.0+')
try: try:
from slugify import __version__ as slugifyVersion from slugify import __version__ as slugifyVersion
if not isinstance(slugifyVersion, str):
slugifyVersion = slugifyVersion.__version__
if StrictVersion('1.2.1') > StrictVersion(slugifyVersion): if StrictVersion('1.2.1') > StrictVersion(slugifyVersion):
missing.append('python-slugify 1.2.1+') missing.append('python-slugify 1.2.1+')
except ImportError: except ImportError: