[arch-commits] Commit in ranger/trunk (2 files)

Jakob Gruber schuay at archlinux.org
Wed Aug 22 19:22:53 UTC 2018


    Date: Wednesday, August 22, 2018 @ 19:22:52
  Author: schuay
Revision: 373297

upgpkg: ranger 1.9.1-2

1.9.1-2

Added:
  ranger/trunk/replace-stopiteration-with-bare-return.patch
Modified:
  ranger/trunk/PKGBUILD

----------------------------------------------+
 PKGBUILD                                     |    9 +++++++--
 replace-stopiteration-with-bare-return.patch |   21 +++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-22 18:43:13 UTC (rev 373296)
+++ PKGBUILD	2018-08-22 19:22:52 UTC (rev 373297)
@@ -26,14 +26,19 @@
     'w3m: for previews of images and html pages')
 conflicts=('ranger-git')
 source=("http://ranger.github.io/${pkgname}-${pkgver}.tar.gz"
-        "http://ranger.github.io/${pkgname}-${pkgver}.tar.gz.sig")
+        "http://ranger.github.io/${pkgname}-${pkgver}.tar.gz.sig"
+        "replace-stopiteration-with-bare-return.patch")
 sha256sums=('40411b0dd08b0abd2632399751b111359786ae5f1e6df047f49653cb7a9edfd2'
-            'SKIP')
+            'SKIP'
+            '116d6a29139acb7d5216ced45cfcc9faa27ab66acc6aecf4306d9adc7059b872')
 validpgpkeys=('1E9B36EC051FF6F7FFC969A7F08CE1E200FB5CDF') # huterich
 
 package() { 
   cd "${srcdir}/${pkgname}-${pkgver}"
 
+  # https://github.com/ranger/ranger/pull/1244
+  patch -Np1 < "${srcdir}/replace-stopiteration-with-bare-return.patch"
+
   # Replace "python" with the python binary you want ranger to use!
   # (python 2.6 and >=3.1 supported, below 2.6 will certainly not work.)
   python setup.py -q install --root="${pkgdir}" --optimize=1

Added: replace-stopiteration-with-bare-return.patch
===================================================================
--- replace-stopiteration-with-bare-return.patch	                        (rev 0)
+++ replace-stopiteration-with-bare-return.patch	2018-08-22 19:22:52 UTC (rev 373297)
@@ -0,0 +1,21 @@
+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
+



More information about the arch-commits mailing list