summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/pacman/pmdb.py4
-rw-r--r--test/pacman/pmpkg.py2
-rw-r--r--test/pacman/pmtest.py6
-rw-r--r--test/pacman/util.py6
4 files changed, 9 insertions, 9 deletions
diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py
index b7b3522a..53de91e6 100644
--- a/test/pacman/pmdb.py
+++ b/test/pacman/pmdb.py
@@ -236,7 +236,7 @@ class pmdb(object):
for pkg, entry in pkg_entries:
path = os.path.join(self.dbdir, pkg.fullname())
util.mkdir(path)
- for name, data in entry.iteritems():
+ for name, data in entry.items():
util.mkfile(path, name, data)
if self.dbfile:
@@ -247,7 +247,7 @@ class pmdb(object):
info = tarfile.TarInfo(pkg.fullname())
info.type = tarfile.DIRTYPE
tar.addfile(info)
- for name, data in entry.iteritems():
+ for name, data in entry.items():
filename = os.path.join(pkg.fullname(), name)
info = tarfile.TarInfo(filename)
info.size = len(data)
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index 24ef1e2b..6f7ae6e1 100644
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -223,7 +223,7 @@ class pmpkg(object):
def installfile(self):
data = []
- for key, value in self.install.iteritems():
+ for key, value in self.install.items():
if value:
data.append("%s() {\n%s\n}\n" % (key, value))
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index 731a9fc7..a1f3645d 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -58,7 +58,7 @@ class pmtest(object):
"""Find a package object matching the name and version specified in
either sync databases or the local package collection. The local database
is allowed to match if allow_local is True."""
- for db in self.db.itervalues():
+ for db in self.db.values():
if db.is_local and not allow_local:
continue
pkg = db.getpkg(name)
@@ -151,7 +151,7 @@ class pmtest(object):
vprint("\t%s" % os.path.join(util.TMPDIR, pkg.filename()))
pkg.finalize()
pkg.makepkg(tmpdir)
- for key, value in self.db.iteritems():
+ for key, value in self.db.items():
for pkg in value.pkgs:
pkg.finalize()
if key == "local" and not self.createlocalpkgs:
@@ -167,7 +167,7 @@ class pmtest(object):
# Creating sync database archives
vprint(" Creating databases")
- for key, value in self.db.iteritems():
+ for key, value in self.db.items():
vprint("\t" + value.treename)
value.generate()
diff --git a/test/pacman/util.py b/test/pacman/util.py
index c1ab390e..ab5a6f47 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -112,13 +112,13 @@ def writedata(filename, data):
def mkcfgfile(filename, root, option, db):
# Options
data = ["[options]"]
- for key, value in option.iteritems():
+ for key, value in option.items():
data.extend(["%s = %s" % (key, j) for j in value])
# Repositories
# sort by repo name so tests can predict repo order, rather than be
# subjects to the whims of python dict() ordering
- for key in sorted(db.iterkeys()):
+ for key in sorted(db.keys()):
if key != "local":
value = db[key]
data.append("[%s]\n" \
@@ -126,7 +126,7 @@ def mkcfgfile(filename, root, option, db):
"Server = file://%s" \
% (value.treename, value.getverify(), \
os.path.join(root, SYNCREPO, value.treename)))
- for optkey, optval in value.option.iteritems():
+ for optkey, optval in value.option.items():
data.extend(["%s = %s" % (optkey, j) for j in optval])
mkfile(root, filename, "\n".join(data))