From e676dd3fc0b84884493190917470654b5b3e0479 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 30 Mar 2008 03:42:59 +0000 Subject: [PATCH] Use enumerate() to iterate over an array. (trunk r9613) svn path=/main/branches/2.1.2/; revision=9614 --- bin/emerge | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/emerge b/bin/emerge index f477aead8..e139e2a23 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3590,8 +3590,7 @@ class depgraph: if myoldbest: if myinslotlist: myoldbest = [myoldbest] - for key in myoldbest: - pos = myoldbest.index(key) + for pos, key in enumerate(myoldbest): key = portage.pkgsplit(key)[1] + "-" + portage.pkgsplit(key)[2] if key[-3:] == "-r0": key = key[:-3] -- 2.26.2