Import modules internally as 'bitbot_%s' to avoid name collisions (e.g.

'telegram')
This commit is contained in:
jesopo 2018-09-24 16:15:17 +01:00
parent 4c8515a9e6
commit 301a973aad

View file

@ -68,7 +68,7 @@ class ModuleManager(object):
"waiting for requirement") "waiting for requirement")
else: else:
break break
module = imp.load_source(name, path) module = imp.load_source("bitbot_%s" % name, path)
if not hasattr(module, "Module"): if not hasattr(module, "Module"):
raise ModuleLoadException("module '%s' doesn't have a " raise ModuleLoadException("module '%s' doesn't have a "