summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-03-19 11:53:50 -0500
committerSol Jerome <sol.jerome@gmail.com>2012-03-19 11:53:50 -0500
commit8413864e1e196b59ec08bac781c364e233e711fb (patch)
tree1588d67a5081f37f37ddb10f348bbb73374c9ea3 /src/lib/Server/Plugins
parentea279b8a9b451214e487197c554fecdd36818d7a (diff)
downloadbcfg2-8413864e1e196b59ec08bac781c364e233e711fb.tar.gz
bcfg2-8413864e1e196b59ec08bac781c364e233e711fb.tar.bz2
bcfg2-8413864e1e196b59ec08bac781c364e233e711fb.zip
Pkgmgr: Fix DeprecationWarning (reported by odenbach on IRC)
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Pkgmgr.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py
index 73c2813d4..bc11bfdcf 100644
--- a/src/lib/Server/Plugins/Pkgmgr.py
+++ b/src/lib/Server/Plugins/Pkgmgr.py
@@ -5,7 +5,10 @@ import logging
import re
import Bcfg2.Server.Plugin
import lxml
-from sets import Set
+try:
+ set
+except NameError:
+ from sets import Set as set
logger = logging.getLogger('Bcfg2.Plugins.Pkgmgr')
@@ -64,7 +67,7 @@ class PNode(Bcfg2.Server.Plugin.INode):
if 'Package' not in pdict:
pdict['Package'] = set()
for child in data.getchildren():
- attrs = Set(data.attrib.keys()).difference(child.attrib.keys() + ['name'])
+ attrs = set(data.attrib.keys()).difference(child.attrib.keys() + ['name'])
for attr in attrs:
try:
child.set(attr, data.get(attr))