summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-02 12:05:53 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-02 12:05:53 +0000
commitf0f6f6cc2499a7a4513cd67d54e8881a28a9800f (patch)
tree19cbb9138e916e99cf267758ec01e728f281e0ca
parentceb8643ec9ebff8925fbc5b1e5f734634e692c2a (diff)
downloadpykolab-f0f6f6cc2499a7a4513cd67d54e8881a28a9800f.tar.gz
Include conf being passed on to plugins
-rw-r--r--pykolab/plugins.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pykolab/plugins.py b/pykolab/plugins.py
index f62663f..0001482 100644
--- a/pykolab/plugins.py
+++ b/pykolab/plugins.py
@@ -30,10 +30,12 @@ import pykolab.plugin
class KolabPlugins:
"""Detects, loads and interfaces with plugins for Kolab"""
- def __init__(self, init=False):
+ def __init__(self, init=False, conf=None):
"""
Searches the plugin directory for plugins, and loads them into a list.
"""
+ self.conf = conf
+
self.plugins = {}
for plugin_path in [ '/usr/share/pykolab/plugin/', './pykolab/plugin/' ]:
@@ -69,7 +71,7 @@ class KolabPlugins:
for plugin in plugins:
if self.plugins[plugin]:
- exec("self.%s = pykolab.plugin.%s.Kolab%s()" % (plugin,plugin,plugin.capitalize()))
+ exec("self.%s = pykolab.plugin.%s.Kolab%s(conf=self.conf)" % (plugin,plugin,plugin.capitalize()))
def set_defaults(self, defaults, plugins=[]):
"""Test for a function set_defaults() in all available and loaded plugins and execute plugin.set_defaults()"""