public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14379 - main/trunk/bin
@ 2009-09-22 20:03 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-09-22 20:03 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-09-22 20:03:10 +0000 (Tue, 22 Sep 2009)
New Revision: 14379

Modified:
   main/trunk/bin/egencache
   main/trunk/bin/emaint
   main/trunk/bin/glsa-check
   main/trunk/bin/repoman
Log:
Replace doct.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.


Modified: main/trunk/bin/egencache
===================================================================
--- main/trunk/bin/egencache	2009-09-22 19:48:26 UTC (rev 14378)
+++ main/trunk/bin/egencache	2009-09-22 20:03:10 UTC (rev 14379)
@@ -204,7 +204,7 @@
 		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 @@
 		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

Modified: main/trunk/bin/emaint
===================================================================
--- main/trunk/bin/emaint	2009-09-22 19:48:26 UTC (rev 14378)
+++ main/trunk/bin/emaint	2009-09-22 20:03:10 UTC (rev 14379)
@@ -475,7 +475,7 @@
 		"cleanresume":CleanResume
 	}
 
-	module_names = list(modules.keys())
+	module_names = list(modules)
 	module_names.sort()
 	module_names.insert(0, "all")
 

Modified: main/trunk/bin/glsa-check
===================================================================
--- main/trunk/bin/glsa-check	2009-09-22 19:48:26 UTC (rev 14378)
+++ main/trunk/bin/glsa-check	2009-09-22 20:03:10 UTC (rev 14379)
@@ -172,12 +172,12 @@
 
 		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))

Modified: main/trunk/bin/repoman
===================================================================
--- main/trunk/bin/repoman	2009-09-22 19:48:26 UTC (rev 14378)
+++ main/trunk/bin/repoman	2009-09-22 20:03:10 UTC (rev 14379)
@@ -153,7 +153,7 @@
 		'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 @@
 	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 @@
 
 	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 @@
 	"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((




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-22 20:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22 20:03 [gentoo-commits] portage r14379 - main/trunk/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox