Make it run again

This commit is contained in:
Ebag333
2016-12-02 03:13:54 -08:00
parent bb96b0af1a
commit d963327ed4
94 changed files with 631 additions and 583 deletions

View File

@@ -8,6 +8,7 @@ elsewhere (in which case can be accessed with packs[name])
"""
import pkgutil
import importlib
# init parent dict
all = {}
@@ -15,10 +16,9 @@ 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 = __import__(modname, fromlist="dummy")
conversionPack = importlib.import_module(modname)
all.update(conversionPack.CONVERSIONS)
modname_tail = modname.rsplit('.', 1)[-1]
packs[modname_tail] = conversionPack.CONVERSIONS