[modules/battery] Re-enable battery module

This commit is contained in:
Tobias Witek 2020-03-06 20:57:32 +01:00
parent 9b96c142d5
commit b841ba3c93
4 changed files with 40 additions and 24 deletions

View file

@ -19,8 +19,9 @@ def load(module_name, config=None):
mod = importlib.import_module('modules.{}.{}'.format(namespace, module_name))
return getattr(mod, 'Module')(config)
except ModuleNotFoundError as e:
pass
log.fatal('failed to import {}: {}'.format(module_name, e))
except ImportError as e:
log.fatal('failed to import {}: {}'.format(module_name, e))
error = str(e)
if not error:
error = 'No such module'