From 03fb1641a4e47a5c467857e314f0f19a53d8bd9d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 30 Mar 2008 03:42:27 +0000 Subject: [PATCH] Use enumerate() it iterate over an array. svn path=/main/trunk/; revision=9613 --- pym/_emerge/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 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] -- 2.26.2