From b3cb2f94deae7ea8baf97d9629d9a8ec6558959c Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Oct 23 2016 12:23:56 +0000 Subject: Allow PluginObjects to do something when their configuration is refreshed Signed-off-by: Patrick Uiterwijk Reviewed-by: Howard Johnson --- diff --git a/ipsilon/util/plugin.py b/ipsilon/util/plugin.py index 1e91346..2b49c82 100644 --- a/ipsilon/util/plugin.py +++ b/ipsilon/util/plugin.py @@ -134,6 +134,9 @@ class PluginObject(Log): def on_disable(self): return + def on_reconfigure(self): + return + def save_enabled_state(self): enabled = [] self._plugins.refresh_enabled() @@ -192,6 +195,7 @@ class PluginObject(Log): except Exception, e: # pylint: disable=broad-except self.error('Failed to refresh config for %s (%s)' % (self.name, e)) + self.on_reconfigure() def save_plugin_config(self, config=None): if config is None: