Fix conversion imports for osx deprecated... :(
This commit is contained in:
@@ -8,7 +8,6 @@ elsewhere (in which case can be accessed with packs[name])
|
||||
"""
|
||||
|
||||
import pkgutil
|
||||
import importlib
|
||||
|
||||
# init parent dict
|
||||
all = {}
|
||||
@@ -16,9 +15,10 @@ all = {}
|
||||
# init container to store the separate conversion packs in case we need them
|
||||
packs = {}
|
||||
|
||||
|
||||
prefix = __name__ + "."
|
||||
for importer, modname, ispkg in pkgutil.iter_modules(__path__, prefix):
|
||||
conversionPack = importlib.import_module(modname)
|
||||
conversionPack = __import__(modname, fromlist="dummy")
|
||||
all.update(conversionPack.CONVERSIONS)
|
||||
modname_tail = modname.rsplit('.', 1)[-1]
|
||||
packs[modname_tail] = conversionPack.CONVERSIONS
|
||||
|
||||
Reference in New Issue
Block a user