diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-03-20 16:17:08 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-03-20 16:17:08 +0000 |
commit | 603b27cd2794448ac3a900a2b14bcf78c51c4a2d (patch) | |
tree | 4c7adf8d39996af635221406f3f99143a3fb5a4c /src | |
parent | 4b97e7a29cf4cf71cd1460061cfc04d76c4cf3f0 (diff) | |
download | bcfg2-603b27cd2794448ac3a900a2b14bcf78c51c4a2d.tar.gz bcfg2-603b27cd2794448ac3a900a2b14bcf78c51c4a2d.tar.bz2 bcfg2-603b27cd2794448ac3a900a2b14bcf78c51c4a2d.zip |
Remove spurious error messages for empty lines in :info files
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2952 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index 26db3fb9c..d5829a016 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -73,6 +73,7 @@ class ConfigFileEntry(object): info = re.compile('^owner:(\s)*(?P<owner>\S+)|group:(\s)*(?P<group>\S+)|' + 'perms:(\s)*(?P<perms>\w+)|encoding:(\s)*(?P<encoding>\w+)|' + '(?P<paranoid>paranoid(\s)*)|interpolate:(\s)*(?P<interpolate>\w+)(\s)*$') + iignore = re.compile('^\S*$') def __init__(self, path, repopath): object.__init__(self) @@ -91,7 +92,8 @@ class ConfigFileEntry(object): for line in open(filename).readlines(): match = self.info.match(line) if not match: - logger.warning("Failed to match line: %s"%line) + if not self.iignore.match(line): + logger.warning("Failed to match line: %s"%line) continue else: mgd = match.groupdict() |