summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorRobert Gogolok <gogo@cs.uni-sb.de>2007-06-05 22:27:35 +0000
committerRobert Gogolok <gogo@cs.uni-sb.de>2007-06-05 22:27:35 +0000
commit0cf3ba4256c6a7fcd230f59d403707472c2cf012 (patch)
treeaa03fa11110ef4b23e32978f5292ce1ca57e0ab7 /src/lib
parentf91745ba46b5b2acfc7b4f11f0e05e16770cbe4a (diff)
downloadbcfg2-0cf3ba4256c6a7fcd230f59d403707472c2cf012.tar.gz
bcfg2-0cf3ba4256c6a7fcd230f59d403707472c2cf012.tar.bz2
bcfg2-0cf3ba4256c6a7fcd230f59d403707472c2cf012.zip
A plugin has access to config file via core object, don't parse it twice
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3242 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Plugins/Metadata.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index 3dc502827..6dbfc2dc3 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -64,12 +64,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin):
self.probes = False
self.probedata = {}
self.extra = {'groups.xml':[], 'clients.xml':[]}
- CP = ConfigParser.ConfigParser()
- if '-C' in sys.argv:
- CP.read([sys.argv[sys.argv.index('-C') + 1]])
- else:
- CP.read(['/etc/bcfg2.conf'])
- self.password = CP.get('communication', 'password')
+ self.password = core.cfile.get('communication', 'password')
def HandleEvent(self, event):
'''Handle update events for data files'''