diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-09-29 01:47:02 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-09-29 01:47:02 +0000 |
commit | 51a48233c0bf82e0b11d0a336d01a31dc2809f1c (patch) | |
tree | 1119d23bcf2ee7f6893bdbb464c9b924e6780746 /src | |
parent | 56ee3aa07a5b245adcee57f69dcb1ec53528cb17 (diff) | |
download | bcfg2-51a48233c0bf82e0b11d0a336d01a31dc2809f1c.tar.gz bcfg2-51a48233c0bf82e0b11d0a336d01a31dc2809f1c.tar.bz2 bcfg2-51a48233c0bf82e0b11d0a336d01a31dc2809f1c.zip |
Make Cfg use info files as well
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2346 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index ca009e263..ded6a21ad 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -83,11 +83,11 @@ class ConfigFileEntry(object): self.paranoid = False self.interpolate = False - def read_info(self): + def read_info(self, name): '''read in :info metadata''' self.interpolate = False self.paranoid = False - filename = "%s/:info" % self.repopath + filename = "%s/%s" % (self.repopath, name) for line in open(filename).readlines(): match = self.info.match(line) if not match: @@ -130,9 +130,9 @@ class ConfigFileEntry(object): '''Handle FAM updates''' action = event.code2str() #logger.debug("Got event %s for %s" % (action, event.filename)) - if event.filename == ':info': + if event.filename in [':info', 'info']: if action in ['changed', 'exists', 'created']: - return self.read_info() + return self.read_info(event.filename) if event.filename != self.path.split('/')[-1]: if not specific.match('/' + event.filename): logger.info('Suppressing event for bogus file %s' % event.filename) |