diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/Pkgmgr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py index bf674d0d0..a3890f2a5 100644 --- a/src/lib/Server/Plugins/Pkgmgr.py +++ b/src/lib/Server/Plugins/Pkgmgr.py @@ -5,6 +5,7 @@ import logging import re import Bcfg2.Server.Plugin import lxml +from sets import Set logger = logging.getLogger('Bcfg2.Plugins.Pkgmgr') @@ -63,8 +64,8 @@ class PNode(Bcfg2.Server.Plugin.INode): if 'Package' not in pdict: pdict['Package'] = set() for child in data.getchildren(): - for attr in [key for key in list(data.attrib.keys()) - if key != 'name' and key not in child.attrib]: + attrs = Set(data.attrib.keys()).difference(child.attrib + ['name']) + for attr in attrs: try: child.set(attr, data.get(attr)) except: |