diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2018-05-14 17:34:10 +0200 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2018-05-14 17:34:10 +0200 |
commit | 8db58ff8dadabe5e34aec1f93ed84860829ff46a (patch) | |
tree | 2ad27351e0b9da52741b485ee999020139e085ba | |
parent | Drop unneeded __init__ for exception classes (diff) | |
download | elogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.tar.gz elogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.tar.bz2 elogv-8db58ff8dadabe5e34aec1f93ed84860829ff46a.zip |
Use enumerate to reduce loop management logic
-rwxr-xr-x | elogv | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |