diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-09-28 21:56:02 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-09-28 21:56:02 +0000 |
commit | 291261044c352f3682d365f0eee5a6cc5e7eb745 (patch) | |
tree | f845301d8022a9565ca971dbe082022df39d73ff | |
parent | 4d10eb3683a20f79521edfd8d9b945bebed01d71 (diff) | |
download | bcfg2-291261044c352f3682d365f0eee5a6cc5e7eb745.tar.gz bcfg2-291261044c352f3682d365f0eee5a6cc5e7eb745.tar.bz2 bcfg2-291261044c352f3682d365f0eee5a6cc5e7eb745.zip |
Make the configuration file permanently accessible
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2340 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Core.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index 2d5b207b3..65d45abcd 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -199,9 +199,9 @@ class Core(object): '''The Core object is the container for all Bcfg2 Server logic, and modules''' def __init__(self, setup, configfile): object.__init__(self) - cfile = ConfigParser.ConfigParser() - cfile.read([configfile]) - self.datastore = cfile.get('server','repository') + self.cfile = ConfigParser.ConfigParser() + self.cfile.read([configfile]) + self.datastore = self.cfile.get('server','repository') try: self.fam = monitor() except IOError: @@ -214,12 +214,12 @@ class Core(object): self.plugins = {} self.revision = '-1' try: - self.svn = cfile.get('server', 'svn') == 'yes' + self.svn = self.cfile.get('server', 'svn') == 'yes' self.read_svn_revision() except: self.svn = False - mpath = cfile.get('server','repository') + mpath = self.cfile.get('server','repository') try: self.metadata = Bcfg2.Server.Metadata.Metadata(self.fam, mpath) except OSError: @@ -227,8 +227,8 @@ class Core(object): self.stats = Statistics("%s/etc/statistics.xml" % (mpath)) - structures = cfile.get('server', 'structures').split(',') - generators = cfile.get('server', 'generators').split(',') + structures = self.cfile.get('server', 'structures').split(',') + generators = self.cfile.get('server', 'generators').split(',') for plugin in structures + generators: if not self.plugins.has_key(plugin): |