summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/APT.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Client/Tools/APT.py')
-rw-r--r--src/lib/Client/Tools/APT.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 1acd70cae..231b69adb 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -87,7 +87,7 @@ class APT(Bcfg2.Client.Tools.Tool):
def VerifyPackage(self, entry, modlist, checksums=True):
'''Verify package for entry'''
- if not entry.attrib.has_key('version'):
+ if not 'version' in entry.attrib:
self.logger.info("Cannot verify unversioned package %s" %
(entry.attrib['name']))
return False
@@ -140,7 +140,7 @@ class APT(Bcfg2.Client.Tools.Tool):
ipkgs = []
bad_pkgs = []
for pkg in packages:
- if not self.pkg_cache.has_key(pkg.get('name')):
+ if not pkg.get('name') in self.pkg_cache:
self.logger.error("APT has no information about package %s" % (pkg.get('name')))
continue
if pkg.get('version') == 'auto':