From e3fb140c8d44d751766535eedefcc4ada6544bd1 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 22 Dec 2008 04:09:48 +0000 Subject: Update dictionary accesses to work with Python 3.0 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4999 ce84e21b-d406-0410-9b95-82705330c041 --- tools/create-debian-pkglist-gp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/create-debian-pkglist-gp.py') diff --git a/tools/create-debian-pkglist-gp.py b/tools/create-debian-pkglist-gp.py index 02c93815c..ae038e056 100644 --- a/tools/create-debian-pkglist-gp.py +++ b/tools/create-debian-pkglist-gp.py @@ -106,8 +106,8 @@ Source URLS: %s""" % (self.filename, self.groups, self.priority, self.architectu pkgname = line.split(' ')[1].strip() elif line[:8] == 'Version:': version = line.split(' ')[1].strip() - if pkgdata.has_key(pkgname): - if pkgdata[pkgname].has_key(arch): + if pkgname in pkgdata: + if arch in pkgdata[pkgname]: # The package is listed twice for the same architecture # We keep the most recent version old_version = pkgdata[pkgname][arch] @@ -161,7 +161,7 @@ Source URLS: %s""" % (self.filename, self.groups, self.priority, self.architectu self._write_to_file('' % (arch)) self.indent_level = self.indent_level + 1 for pkg in self._get_sorted_pkg_keys(pkgdata): - if pkgdata[pkg].has_key(arch): + if arch in pkgdata[pkg]: self._write_to_file('' % (pkg, pkgdata[pkg][arch])) #perarch += 1 self.indent_level = self.indent_level - 1 -- cgit v1.2.3-1-g7c22