summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-22 20:03:10 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-22 20:03:10 +0000
commit38e5d658da8cd06b72e4e802f9e831a2143307d1 (patch)
treead7bf8ff4ccdd8ab7584e725f17abffb3874b87f /bin
parentDo manual unicode handling (instead of using the wrapped os module) in (diff)
downloadportage-multirepo-38e5d658da8cd06b72e4e802f9e831a2143307d1.tar.gz
portage-multirepo-38e5d658da8cd06b72e4e802f9e831a2143307d1.tar.bz2
portage-multirepo-38e5d658da8cd06b72e4e802f9e831a2143307d1.zip
Replace doct.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x. svn path=/main/trunk/; revision=14379
Diffstat (limited to 'bin')
-rwxr-xr-xbin/egencache4
-rwxr-xr-xbin/emaint2
-rwxr-xr-xbin/glsa-check4
-rwxr-xr-xbin/repoman8
4 files changed, 9 insertions, 9 deletions
diff --git a/bin/egencache b/bin/egencache
index b160189a..69a41fde 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -204,7 +204,7 @@ class GenCache(object):
dead_nodes = set()
if self._global_cleanse:
try:
- for cpv in trg_cache.keys():
+ for cpv in trg_cache:
cp = cpv_getkey(cpv)
if cp is None:
self.returncode |= 1
@@ -224,7 +224,7 @@ class GenCache(object):
else:
cp_set = self._cp_set
try:
- for cpv in trg_cache.keys():
+ for cpv in trg_cache:
cp = cpv_getkey(cpv)
if cp is None:
self.returncode |= 1
diff --git a/bin/emaint b/bin/emaint
index 611c323d..7aac5d49 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -475,7 +475,7 @@ def emaint_main(myargv):
"cleanresume":CleanResume
}
- module_names = list(modules.keys())
+ module_names = list(modules)
module_names.sort()
module_names.insert(0, "all")
diff --git a/bin/glsa-check b/bin/glsa-check
index 787cf39d..19f451c5 100755
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -172,12 +172,12 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr):
fd1.write(color(myglsa.nr) + " " + color(status) + " " + color(access) + myglsa.title + " (")
if not verbose:
- for pkg in list(myglsa.packages.keys())[:3]:
+ for pkg in list(myglsa.packages)[:3]:
fd1.write(" " + pkg + " ")
if len(myglsa.packages) > 3:
fd1.write("... ")
else:
- for pkg in myglsa.packages.keys():
+ for pkg in myglsa.packages:
mylist = vardb.match(portage.dep_getkey(str(pkg)))
if len(mylist) > 0:
pkg = color(" ".join(mylist))
diff --git a/bin/repoman b/bin/repoman
index 95022620..edec1350 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -153,7 +153,7 @@ def ParseArgs(args, qahelp):
'scan' : 'Scan directory tree for QA issues'
}
- mode_keys = list(modes.keys())
+ mode_keys = list(modes)
mode_keys.sort()
parser = RepomanOptionParser(formatter=RepomanHelpFormatter(), usage="%prog [options] [mode]")
@@ -198,7 +198,7 @@ def ParseArgs(args, qahelp):
parser.add_option('--without-mask', dest='without_mask', action='store_true',
default=False, help='behave as if no package.mask entries exist (not allowed with commit mode)')
- parser.add_option('--mode', type='choice', dest='mode', choices=list(modes.keys()),
+ parser.add_option('--mode', type='choice', dest='mode', choices=list(modes),
help='specify which mode repoman will run in (default=full)')
parser.on_tail("\n " + green("Modes".ljust(20) + " Description\n"))
@@ -208,7 +208,7 @@ def ParseArgs(args, qahelp):
parser.on_tail("\n " + green("QA keyword".ljust(20) + " Description\n"))
- sorted_qa = list(qahelp.keys())
+ sorted_qa = list(qahelp)
sorted_qa.sort()
for k in sorted_qa:
parser.on_tail(" %s %s\n" % (k.ljust(20), qahelp[k]))
@@ -330,7 +330,7 @@ qahelp={
"upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
}
-qacats = list(qahelp.keys())
+qacats = list(qahelp)
qacats.sort()
qawarnings = set((