#138 Add PluginObject reconfiguring
Merged 7 years ago by puiterwijk. Opened 7 years ago by puiterwijk.
puiterwijk/ipsilon reconfigure  into  master

@@ -223,6 +223,12 @@ 

  

          return d

  

+     def on_reconfigure(self):

+         super(IdpProvider, self).on_reconfigure()

+         self.init_idp()

+         self.extensions.enable(self._config['enabled extensions'].get_value(),

+                                self)

+ 

  

  class Installer(ProviderInstaller):

  

file modified
+4
@@ -134,6 +134,9 @@ 

      def on_disable(self):

          return

  

+     def on_reconfigure(self):

+         return

+ 

      def save_enabled_state(self):

          enabled = []

          self._plugins.refresh_enabled()
@@ -192,6 +195,7 @@ 

              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:

This allows plugins to reload parts of their modules when they are instructed that their configuration has been changed.

rebased

7 years ago

Pull-Request has been merged by puiterwijk

7 years ago