summaryrefslogtreecommitdiffstats
path: root/bin/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-22 01:53:50 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-22 01:53:50 +0000
commitc0cfcc8a6eb2e4adff8eb3d3bb9f44d9b7124ccd (patch)
tree52cfa5cff4798cc05c2163976cd41bea3f678ddd /bin/emerge
parent337f4de4c1bfb38e02a9f2b5be05884e68299d01 (diff)
downloadportage-c0cfcc8a6eb2e4adff8eb3d3bb9f44d9b7124ccd.tar.gz
portage-c0cfcc8a6eb2e4adff8eb3d3bb9f44d9b7124ccd.tar.bz2
portage-c0cfcc8a6eb2e4adff8eb3d3bb9f44d9b7124ccd.zip
Remove lots of unnecessary list generation via dict.keys(). (trunk r6911)
svn path=/main/branches/2.1.2/; revision=6930
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/emerge b/bin/emerge
index 4e3197bf0..c2053c0a9 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -439,7 +439,7 @@ class search:
if self.searchre.search(full_desc):
self.matches["desc"].append([full_package,masked])
self.mlen=0
- for mtype in self.matches.keys():
+ for mtype in self.matches:
self.matches[mtype].sort()
self.mlen += len(self.matches[mtype])
@@ -448,7 +448,7 @@ class search:
print "\b\b \n[ Results for search key : "+white(self.searchkey)+" ]"
print "[ Applications found : "+white(str(self.mlen))+" ]"
print " "
- for mtype in self.matches.keys():
+ for mtype in self.matches:
for match,masked in self.matches[mtype]:
if mtype=="pkg":
catpack=match
@@ -2182,7 +2182,7 @@ class depgraph:
mylist = getlist(self.settings, "system")
worlddict=genericdict(worldlist)
- for x in worlddict.keys():
+ for x in worlddict:
if not portage.isvalidatom(x):
world_problems = True
continue
@@ -2665,7 +2665,7 @@ class depgraph:
if myfilesdict is None:
myfilesdict="[empty/missing/bad digest]"
else:
- for myfetchfile in myfilesdict.keys():
+ for myfetchfile in myfilesdict:
if myfetchfile not in myfetchlist:
mysize+=myfilesdict[myfetchfile]
myfetchlist.append(myfetchfile)
@@ -3554,7 +3554,7 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
if not slotmap.has_key(myslot):
slotmap[myslot]={}
slotmap[myslot][localtree.dbapi.cpv_counter(mypkg)]=mypkg
- for myslot in slotmap.keys():
+ for myslot in slotmap:
counterkeys=slotmap[myslot].keys()
counterkeys.sort()
if not counterkeys:
@@ -3581,7 +3581,7 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
finally:
if vdb_lock:
portage_locks.unlockdir(vdb_lock)
- for x in pkgmap.keys():
+ for x in pkgmap:
for y in localtree.dep_match(x):
if y not in pkgmap[x]["omitted"] and \
y not in pkgmap[x]["selected"] and \
@@ -3637,7 +3637,7 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
if not autoclean:
countdown(int(settings["CLEAN_DELAY"]), ">>> Unmerging")
- for x in pkgmap.keys():
+ for x in pkgmap:
for y in pkgmap[x]["selected"]:
print ">>> Unmerging "+y+"..."
emergelog(xterm_titles, "=== Unmerging... ("+y+")")