diff options
author | hut <hut@lavabit.com> | 2010-01-01 23:55:25 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-01 23:55:25 +0100 |
commit | 811f5bb82769413e5f9b389f92218d05cbe1597e (patch) | |
tree | 73184a1621bb61dafca73d9b5ea850b0b1018cda /ranger | |
parent | 11ee0f3e0d9177731f85287cac3e67290b1bf127 (diff) | |
download | ranger-811f5bb82769413e5f9b389f92218d05cbe1597e.tar.gz |
pager: fixed unicode decode error
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/pager.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py index d69d580e..0e13ecbd 100644 --- a/ranger/gui/widgets/pager.py +++ b/ranger/gui/widgets/pager.py @@ -147,10 +147,13 @@ class Pager(Widget): return self.lines[n] except (KeyError, IndexError): if attempt_to_read and self.source_is_stream: - for l in self.source: - self.lines.append(l) - if len(self.lines) > n: - break + try: + for l in self.source: + self.lines.append(l) + if len(self.lines) > n: + break + except UnicodeError: + pass return self._get_line(n, attempt_to_read=False) return "" |