summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-30 03:42:27 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-30 03:42:27 +0000
commit03fb1641a4e47a5c467857e314f0f19a53d8bd9d (patch)
tree5d3ed6e4007ac80e83355e62f2037849b21403a1
parentbb85dfca12bec291d8a982aca48ea144469ff1cc (diff)
downloadportage-03fb1641a4e47a5c467857e314f0f19a53d8bd9d.tar.gz
portage-03fb1641a4e47a5c467857e314f0f19a53d8bd9d.tar.bz2
portage-03fb1641a4e47a5c467857e314f0f19a53d8bd9d.zip
Use enumerate() it iterate over an array.
svn path=/main/trunk/; revision=9613
-rw-r--r--pym/_emerge/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 328b7f1e9..cb369a6b9 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3914,8 +3914,7 @@ class depgraph(object):
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]