summaryrefslogtreecommitdiffstats
path: root/tools/create-debian-pkglist.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2008-12-22 04:09:48 +0000
committerSol Jerome <solj@ices.utexas.edu>2008-12-22 04:09:48 +0000
commite3fb140c8d44d751766535eedefcc4ada6544bd1 (patch)
tree9cfe7aa923ec2b1f2e17df1ced892508987b9a6f /tools/create-debian-pkglist.py
parent5ab6c7a56e1cb16fee6b04a2b74e615f8f4c557e (diff)
downloadbcfg2-e3fb140c8d44d751766535eedefcc4ada6544bd1.tar.gz
bcfg2-e3fb140c8d44d751766535eedefcc4ada6544bd1.tar.bz2
bcfg2-e3fb140c8d44d751766535eedefcc4ada6544bd1.zip
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
Diffstat (limited to 'tools/create-debian-pkglist.py')
-rwxr-xr-xtools/create-debian-pkglist.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/create-debian-pkglist.py b/tools/create-debian-pkglist.py
index f64a2ed1f..9761d43ac 100755
--- a/tools/create-debian-pkglist.py
+++ b/tools/create-debian-pkglist.py
@@ -37,13 +37,13 @@ def processSource(prefix, source, dists, archs, prio, groups, packages):
pkgname = line.split(' ')[1].strip()
elif line[:8] == 'Version:':
version = line.split(' ')[1].strip()
- if pkgdata.has_key(pkgname):
+ if pkgname in pkgdata:
pkgdata[pkgname][arch] = version
else:
pkgdata[pkgname] = {arch:version}
elif line[:8] == 'Depends:':
deps = re.sub(',', '', re.sub('\(.*\)', '', line)).split()[1:]
- if pkgdeps.has_key(pkgname):
+ if pkgname in pkgdeps:
pkgdeps[pkgname][arch] = deps
else:
pkgdeps[pkgname] = {arch:deps}
@@ -69,7 +69,7 @@ def processSource(prefix, source, dists, archs, prio, groups, packages):
for arch in archs:
output.write('<Group name="%s">\n' % (arch))
for pkg in pkgdata.keys():
- if pkgdata[pkg].has_key(arch):
+ if arch in pkgdata[pkg]:
output.write('<Package name="%s" version="%s"/>\n' % (pkg, pkgdata[pkg][arch]))
perarch += 1
output.write('</Group>\n')