aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2018-05-14 17:34:10 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2018-05-14 17:34:10 +0200
commit8db58ff8dadabe5e34aec1f93ed84860829ff46a (patch)
tree2ad27351e0b9da52741b485ee999020139e085ba
parentDrop unneeded __init__ for exception classes (diff)
downloadelogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.tar.gz
elogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.tar.bz2
elogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.zip
Use enumerate to reduce loop management logic
-rwxr-xr-xelogv3
1 files changed, 1 insertions, 2 deletions
diff --git a/elogv b/elogv
index 32cb1db..ec38d7b 100755
--- a/elogv
+++ b/elogv
@@ -504,8 +504,7 @@ class ElogViewer:
self.file_pad = curses.newpad(len(self.packages),self.width)
self.file_pad.erase()
- for i in range(len(self.packages)):
- pkg = self.packages[i]
+ for i, pkg in enumerate(self.packages):
if i == self.usel:
cp = selected
# Maybe that the logf pointed by self.usel changed, (example