From ea25166d42aaf5d8a48ef7a172a3f8e1f87767d9 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 31 Jan 2014 14:39:33 -0500 Subject: Metadata: fix check for Groups with options in duplicate groups test --- src/lib/Bcfg2/Server/Plugins/Metadata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/Bcfg2/Server/Plugins/Metadata.py b/src/lib/Bcfg2/Server/Plugins/Metadata.py index 343e14162..f734c98d0 100644 --- a/src/lib/Bcfg2/Server/Plugins/Metadata.py +++ b/src/lib/Bcfg2/Server/Plugins/Metadata.py @@ -1657,8 +1657,8 @@ class MetadataLint(Bcfg2.Server.Lint.ServerPlugin): "client") def duplicate_groups(self): - """ Check for groups that are defined more than once. There - are two ways this can happen: + """ Check for groups that are defined more than once. There are two + ways this can happen: 1. The group is listed twice with contradictory options. 2. The group is listed with no options *first*, and then with @@ -1674,7 +1674,8 @@ class MetadataLint(Bcfg2.Server.Lint.ServerPlugin): grpname = grp.get("name") if grpname in duplicates: duplicates[grpname].append(grp) - elif len(grp.attrib) > 1: # group has options + elif set(grp.attrib.keys()).difference(['negate', 'name']): + # group has options if grpname in groups: duplicates[grpname] = [grp, groups[grpname]] else: -- cgit v1.2.3-1-g7c22