summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorToon Nolten <toonn@toonn.io>2018-08-07 16:53:46 +0200
committerGitHub <noreply@github.com>2018-08-07 16:53:46 +0200
commite202207de110009ba9e4eb964ecbd58c4f063c31 (patch)
treef4346b8eb7317ad07ebd7f36b55af30c88e3e7d7
parentbb277d1eff052e2478fb8c132bc42793ce91b870 (diff)
parent2923398f5049a27fa509d5d5c287e9be089514fa (diff)
downloadranger-e202207de110009ba9e4eb964ecbd58c4f063c31.tar.gz
Merge pull request #1244 from yannick-c/master
Replace StopIteration with bare return
-rw-r--r--ranger/gui/widgets/pager.py4
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