fixed ugly bug regarding KeyError "class" not in class item :)
thank you StackOverflow, again!
This commit is contained in:
parent
26fb3748b5
commit
8841ea7a3c
1 changed files with 3 additions and 3 deletions
|
|
@ -105,11 +105,11 @@ class ConfigParser:
|
||||||
"""
|
"""
|
||||||
mods = self._loadedMods[modPart]
|
mods = self._loadedMods[modPart]
|
||||||
if clazz in mods:
|
if clazz in mods:
|
||||||
return mods["class"]
|
return mods[clazz]
|
||||||
else:
|
else:
|
||||||
#mod = __import__(clazz)
|
#mod = __import__(clazz)
|
||||||
path = join("lib", modPart, clazz + ".py")
|
p = join("lib", modPart, clazz + ".py")
|
||||||
mod = imp.load_source(clazz, path)
|
mod = imp.load_source(clazz, p)
|
||||||
mods[clazz] = mod
|
mods[clazz] = mod
|
||||||
return mod
|
return mod
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue