summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-01-24 16:38:25 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-01-24 16:38:25 +0000
commit12341bf8ce59e9003caedc16b9b5d7bf34332652 (patch)
treef16694ff09074e55591f3deec8f2183f28190d8d
parent0b85306d1a3c645503e6fe349ae6111d9ae21348 (diff)
downloadbcfg2-12341bf8ce59e9003caedc16b9b5d7bf34332652.tar.gz
bcfg2-12341bf8ce59e9003caedc16b9b5d7bf34332652.tar.bz2
bcfg2-12341bf8ce59e9003caedc16b9b5d7bf34332652.zip
Make dynamic group processing more tolerant of whitespace
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2716 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Metadata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index a4ee1640c..396b26e91 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -264,8 +264,9 @@ class Metadata(Bcfg2.Server.Plugin.Plugin):
dlines = data.text.split('\n')
for line in dlines[:]:
if line.split(':')[0] == 'group':
- if line.split(':')[1] not in self.cgroups[client.hostname]:
- self.cgroups[client.hostname].append(line.split(':')[1])
+ newgroup = line.split(':')[1].strip()
+ if newgroup not in self.cgroups[client.hostname]:
+ self.cgroups[client.hostname].append(newgroup)
dlines.remove(line)
dtext = "\n".join(dlines)
try: