summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Core.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-10-29 10:21:12 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-10-29 15:22:33 -0400
commit6dd9756f7a87d5e875f5db02f306c7b906902a96 (patch)
tree81ab5e948e9b2449609e260628d5d14f63f5a6cf /src/lib/Bcfg2/Server/Core.py
parentaec12296330b121fcb3fd038f85c0a4590be8ce4 (diff)
downloadbcfg2-6dd9756f7a87d5e875f5db02f306c7b906902a96.tar.gz
bcfg2-6dd9756f7a87d5e875f5db02f306c7b906902a96.tar.bz2
bcfg2-6dd9756f7a87d5e875f5db02f306c7b906902a96.zip
Plugins: refactored out unnecessary datastore constructor argument
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r--src/lib/Bcfg2/Server/Core.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 4e7f30db5..796cd8bcc 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -83,8 +83,8 @@ class DefaultACL(Plugin, ClientACLs):
is only loaded if no other ClientACLs plugin is enabled. """
create = False
- def __init__(self, core, datastore):
- Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
+ def __init__(self, core):
+ Bcfg2.Server.Plugin.Plugin.__init__(self, core)
Bcfg2.Server.Plugin.ClientACLs.__init__(self)
def check_acl_ip(self, address, rmi):
@@ -130,8 +130,8 @@ class Core(object):
.. automethod:: _file_monitor_thread
.. automethod:: _perflog_thread
"""
- #: The Bcfg2 repository directory
- self.datastore = Bcfg2.Options.setup.repository
+ global _CORE
+ _CORE = self
#: A :class:`logging.Logger` object for use by the core
self.logger = logging.getLogger('bcfg2-server')
@@ -382,7 +382,7 @@ class Core(object):
if conflict in self.plugins]
self.plugin_blacklist[plugin.name] = cplugs
try:
- self.plugins[plugin.name] = plugin(self, self.datastore)
+ self.plugins[plugin.name] = plugin(self)
except PluginInitError:
self.logger.error("Failed to instantiate plugin %s" % plugin,
exc_info=1)