diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/emerge | 14 | ||||
-rwxr-xr-x | bin/fix-db.py | 4 | ||||
-rwxr-xr-x | bin/md5check.py | 8 | ||||
-rwxr-xr-x | bin/repoman | 6 |
4 files changed, 16 insertions, 16 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+")") diff --git a/bin/fix-db.py b/bin/fix-db.py index 8292bc960..301ec8002 100755 --- a/bin/fix-db.py +++ b/bin/fix-db.py @@ -136,7 +136,7 @@ for cat in os.listdir(vardbdir): actions = {} writemsg("\n\n") -for catpkg in bad.keys(): +for catpkg in bad: bad[catpkg].sort() mystr = "" @@ -155,7 +155,7 @@ for catpkg in bad.keys(): if (len(sys.argv) > 1) and (sys.argv[1] == "--fix"): writemsg("These are only directions, at the moment.") - for catpkg in actions.keys(): + for catpkg in actions: action = actions[catpkg] writemsg("We will now '%s' '%s'..." % (action, catpkg)) #if action == diff --git a/bin/md5check.py b/bin/md5check.py index 8f1159e75..5d960a402 100755 --- a/bin/md5check.py +++ b/bin/md5check.py @@ -68,10 +68,10 @@ for mycpv in hugelist: else: continue - if mybn not in md5sums.keys(): + if mybn not in md5sums: portage_util.writemsg("Missing md5sum: %s in %s\n" % (mybn, mycpv)) else: - if mybn in md5_list.keys(): + if mybn in md5_list: if (md5_list[mybn]["MD5"] != md5sums[mybn]["MD5"]) or \ (md5_list[mybn]["size"] != md5sums[mybn]["size"]): @@ -89,12 +89,12 @@ for mycpv in hugelist: del md5sums[mybn] #portage.writemsg(str(bn_list)+"\n") - for x in md5sums.keys(): + for x in md5sums: if x not in bn_list: portage.writemsg("Extra md5sum: %s in %s\n" % (x, mycpv)) print col_list print -print str(len(md5_list.keys()))+" unique distfile md5s." +print str(len(md5_list))+" unique distfile md5s." print str(len(bn_list))+" unique distfile names." diff --git a/bin/repoman b/bin/repoman index f5ef34dca..a93965ff3 100755 --- a/bin/repoman +++ b/bin/repoman @@ -349,9 +349,9 @@ myoptions=[] if len(sys.argv)>1: x=1 while x < len(sys.argv): - if sys.argv[x] in shortmodes.keys(): + if sys.argv[x] in shortmodes: sys.argv[x]=shortmodes[sys.argv[x]] - elif sys.argv[x] in repoman_shortoptions.keys(): + elif sys.argv[x] in repoman_shortoptions: sys.argv[x] = repoman_shortoptions[sys.argv[x]] if sys.argv[x] in modes: if mymode is None: @@ -1477,7 +1477,7 @@ def grouplist(mylist,seperator="/"): xs=x.split(seperator) if xs[0]==".": xs=xs[1:] - if xs[0] not in mygroups.keys(): + if xs[0] not in mygroups: mygroups[xs[0]]=[seperator.join(xs[1:])] else: mygroups[xs[0]]+=[seperator.join(xs[1:])] |