From 7da58fe5217f6ef0b7bb30ffd61ee5864b015943 Mon Sep 17 00:00:00 2001 From: Schrolli Date: Mon, 29 Jun 2015 12:55:13 +0200 Subject: [PATCH] call the .onLoad() routine during plugin loading --- includes/pluginLoader.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/pluginLoader.py b/includes/pluginLoader.py index 31bd097..3b606af 100644 --- a/includes/pluginLoader.py +++ b/includes/pluginLoader.py @@ -30,7 +30,17 @@ def loadPlugins(): # call for each Plugin the loadPlugin() Methode plugin = loadPlugin(i) # Add it to globals.pluginList - globals.pluginList[i["name"]] = plugin + globals.pluginList[i["name"]] = plugin + + #call the .onLoad() routine for all active plugins + for pluginName, plugin in globals.pluginList.items(): + logging.debug("call %s.onLoad()", pluginName) + try: + plugin.onLoad(typ,freq,data) + except: + # call next plugin, if one has thrown an exception + pass + except: logging.exception("cannot load Plugins")