diff options
author | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-30 19:26:51 +0000 |
---|---|---|
committer | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-30 19:26:51 +0000 |
commit | e8c9ba57d10d174c79ac1aae9b53661ee8464d0f (patch) | |
tree | 65cb5f7b0c699e6c97eb365ec83c76155a023f7e /src/lib/Server/Plugins | |
parent | 73ba22f7e519694dbf7010810de69b3b845f634f (diff) | |
download | bcfg2-e8c9ba57d10d174c79ac1aae9b53661ee8464d0f.tar.gz bcfg2-e8c9ba57d10d174c79ac1aae9b53661ee8464d0f.tar.bz2 bcfg2-e8c9ba57d10d174c79ac1aae9b53661ee8464d0f.zip |
Settings class to remove redundant code for parsing config file.
If a module wants to access bcfg2 settings:
from Bcfg2.Settings import settings
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4131 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index ce9d18f7a..5f3262ec0 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -1,7 +1,9 @@ '''This file stores persistent metadata for the BCFG Configuration Repository''' __revision__ = '$Revision$' -import lxml.etree, re, socket, time, sys, ConfigParser +from Bcfg2.Settings import settings + +import lxml.etree, re, socket, time, sys import Bcfg2.Server.Plugin class MetadataConsistencyError(Exception): @@ -67,7 +69,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin): self.ptimes = {} self.pctime = 0 self.extra = {'groups.xml':[], 'clients.xml':[]} - self.password = core.cfile.get('communication', 'password') + self.password = settings.COMMUNICATION_PASSWORD def HandleEvent(self, event): '''Handle update events for data files''' |