change pluginLoader and exception-handling

- if the function plugin.onLoad() throws an exception the plugin will skipped
- change exception-handling for pluginLoader
This commit is contained in:
JHCD 2015-06-29 23:24:48 +02:00
parent a1d610ee6a
commit 09b9cc5f7d
9 changed files with 100 additions and 72 deletions

View file

@ -18,24 +18,21 @@ from includes import globals # Global variables
##
#
# onLoad function of plugin
# will be called by the pluginLoader
# onLoad (init) function of plugin
# will be called one time by the pluginLoader on start
#
def onLoad():
"""
While loading the plugins by pluginLoader.loadPlugins()
this onLoad() routine are called
this onLoad() routine is called one time for initialize the plugin
@requires: nothing
@return: nothing
"""
try:
# we have to do nothing here...
pass
except:
logging.error("unknown error")
logging.debug("unknown error", exc_info=True)
# nothing to do for this plugin
return
##
#