diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-01-31 14:39:33 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-02-07 08:18:37 -0500 |
commit | ea25166d42aaf5d8a48ef7a172a3f8e1f87767d9 (patch) | |
tree | fca493187f52768dd536a65d549ef6a2a8777cd0 /src/lib/Bcfg2/Server | |
parent | c5ad7f0edbdbfcb38506b97a92001a9624e36f6b (diff) | |
download | bcfg2-ea25166d42aaf5d8a48ef7a172a3f8e1f87767d9.tar.gz bcfg2-ea25166d42aaf5d8a48ef7a172a3f8e1f87767d9.tar.bz2 bcfg2-ea25166d42aaf5d8a48ef7a172a3f8e1f87767d9.zip |
Metadata: fix check for Groups with options in duplicate groups test
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Metadata.py | 7 |
1 files 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: |