check module version when loading it
This commit is contained in:
parent
988542463d
commit
a94d6c9972
1 changed files with 3 additions and 0 deletions
|
|
@ -142,5 +142,8 @@ class ModulesLoader(object):
|
|||
finally:
|
||||
sys.path.remove(minfo.path)
|
||||
|
||||
if module.version != self.repositories.version:
|
||||
raise ModuleLoadError(module_name, "Module requires Weboob %s, but you use Weboob %s" % (module.version, self.repositories.version))
|
||||
|
||||
self.loaded[module_name] = module
|
||||
self.logger.debug('Loaded module "%s" from %s' % (module_name, module.package.__path__[0]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue