Fix error in pluginLoader.py

see Issue #52
This commit is contained in:
Schrolli 2015-07-09 08:04:55 +02:00
parent 76686e016c
commit bd6432b1e5

View file

@ -35,18 +35,19 @@ def loadPlugins():
logging.error("error loading plugin: %s", i["name"])
logging.debug("error loading plugin: %s", i["name"], exc_info=True)
pass
try:
# Try to call the .onLoad() routine for all active plugins
logging.debug("call %s.onLoad()", i["name"])
plugin.onLoad()
# Add it to globals.pluginList
globals.pluginList[i["name"]] = plugin
except:
# call next plugin, if one has thrown an exception
logging.error("error calling %s.onLoad()", i["name"])
logging.debug("error calling %s.onLoad()", exc_info=True)
pass
else: # only call onLoad() and insert into pluginList[] if import is succesfull
try:
# Try to call the .onLoad() routine for all active plugins
logging.debug("call %s.onLoad()", i["name"])
plugin.onLoad()
# Add it to globals.pluginList
globals.pluginList[i["name"]] = plugin
except:
# call next plugin, if one has thrown an exception
logging.error("error calling %s.onLoad()", i["name"])
logging.debug("error calling %s.onLoad()", exc_info=True)
pass
except:
logging.error("cannot load plugins")
logging.debug("cannot load plugins", exc_info=True)