From c0cfcc8a6eb2e4adff8eb3d3bb9f44d9b7124ccd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Jun 2007 01:53:50 +0000 Subject: Remove lots of unnecessary list generation via dict.keys(). (trunk r6911) svn path=/main/branches/2.1.2/; revision=6930 --- bin/md5check.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/md5check.py') 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." -- cgit v1.2.3-1-g7c22