diff options
author | Toon Nolten <toonn@toonn.io> | 2018-08-07 16:53:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 16:53:46 +0200 |
commit | e202207de110009ba9e4eb964ecbd58c4f063c31 (patch) | |
tree | f4346b8eb7317ad07ebd7f36b55af30c88e3e7d7 | |
parent | bb277d1eff052e2478fb8c132bc42793ce91b870 (diff) | |
parent | 2923398f5049a27fa509d5d5c287e9be089514fa (diff) | |
download | ranger-e202207de110009ba9e4eb964ecbd58c4f063c31.tar.gz |
Merge pull request #1244 from yannick-c/master
Replace StopIteration with bare return
-rw-r--r-- | ranger/gui/widgets/pager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py index 9afbfd15..d64d4ac1 100644 --- a/ranger/gui/widgets/pager.py +++ b/ranger/gui/widgets/pager.py @@ -234,7 +234,7 @@ class Pager(Widget): # pylint: disable=too-many-instance-attributes def _generate_lines(self, starty, startx): i = starty if not self.source: - raise StopIteration + return while True: try: line = self._get_line(i).expandtabs(4) @@ -244,5 +244,5 @@ class Pager(Widget): # pylint: disable=too-many-instance-attributes line = line[startx:self.wid + startx] yield line.rstrip().replace('\r\n', '\n') except IndexError: - raise StopIteration + return i += 1 |