Catch exception during module loading: just skip the module registration
This commit is contained in:
parent
91688875d4
commit
c1858fff3a
3 changed files with 15 additions and 12 deletions
|
|
@ -117,7 +117,12 @@ def load_file(filename, context):
|
|||
for mod in config.getNodes("module"):
|
||||
context.modules_configuration[mod["name"]] = mod
|
||||
if get_boolean(mod, "autoload", default=True):
|
||||
__import__(mod["name"])
|
||||
try:
|
||||
__import__(mod["name"])
|
||||
except:
|
||||
logger.exception("Exception occurs when loading module"
|
||||
" '%s'", mod["name"])
|
||||
|
||||
|
||||
# Load files asked by the configuration file
|
||||
for load in config.getNodes("include"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue