diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-03-22 20:54:56 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-03-22 20:54:56 +0000 |
commit | 444c9d1a25b636e53d37ec897b183244b850b89a (patch) | |
tree | 6114b9ac2508fa5996361e3d3cb40ada4a5293d5 /src/lib | |
parent | 095b94dc343d9656bf959fa1082d5d644b1b0e2c (diff) | |
download | bcfg2-444c9d1a25b636e53d37ec897b183244b850b89a.tar.gz bcfg2-444c9d1a25b636e53d37ec897b183244b850b89a.tar.bz2 bcfg2-444c9d1a25b636e53d37ec897b183244b850b89a.zip |
Implement EntrySet-level error suppression for non-matching events
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4442 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index 9e524df1f..f9f330736 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -89,8 +89,6 @@ class FileBacked(object): object.__init__(self) self.data = '' self.name = name - #self.readonce = 0 - #self.HandleEvent() def HandleEvent(self, _=None): '''Read file upon update''' @@ -446,6 +444,7 @@ class Specificity: class EntrySet: '''Entry sets deal with the host- and group-specific entries''' + ignore = re.compile("^(.*~|\\..*\\.(tmp|sw[px]))$") def __init__(self, basename, path, props, entry_type): self.path = path self.entry_type = entry_type @@ -487,7 +486,8 @@ class EntrySet: try: spec = Specificity(self.specific, event.filename) except SpecificityError: - logger.error("Could not process filename %s; ignoring" % fpath) + if not self.ignore.match(event.filename): + logger.error("Could not process filename %s; ignoring" % fpath) return self.entries[event.filename] = self.entry_type(fpath, self.properties, |