diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fix-db.py | 4 | ||||
-rwxr-xr-x | bin/md5check.py | 8 | ||||
-rwxr-xr-x | bin/portageq | 4 | ||||
-rwxr-xr-x | bin/repoman | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/bin/fix-db.py b/bin/fix-db.py index 19eb31425..d17347efb 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 3525ea111..c625fad17 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/portageq b/bin/portageq index b9260fed5..11ac316eb 100755 --- a/bin/portageq +++ b/bin/portageq @@ -305,7 +305,7 @@ def list_preserved_libs(argv): sys.exit(2) mylibs = portage.db[argv[0]]["vartree"].dbapi.plib_registry.getPreservedLibs() rValue = 0 - for cpv in mylibs.keys(): + for cpv in mylibs: for path in mylibs[cpv]: print "%s: %s" % (cpv, path) rValue = 1 @@ -328,7 +328,7 @@ def usage(argv): # Show our commands -- we do this by scanning the functions in this # file, and formatting each functions documentation. # - commands = [x for x in globals().keys() if x not in \ + commands = [x for x in globals() if x not in \ ("usage", "__doc__", "__name__", "main", "os", "portage", \ "sys", "__builtins__", "types", "string","exithandler")] commands.sort() diff --git a/bin/repoman b/bin/repoman index 6fcc2a1af..483eff4e5 100755 --- a/bin/repoman +++ b/bin/repoman @@ -351,9 +351,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: @@ -1479,7 +1479,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:])] |