summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-01 23:55:25 +0100
committerhut <hut@lavabit.com>2010-01-01 23:55:25 +0100
commit811f5bb82769413e5f9b389f92218d05cbe1597e (patch)
tree73184a1621bb61dafca73d9b5ea850b0b1018cda
parent11ee0f3e0d9177731f85287cac3e67290b1bf127 (diff)
downloadranger-811f5bb82769413e5f9b389f92218d05cbe1597e.tar.gz
pager: fixed unicode decode error
-rw-r--r--ranger/gui/widgets/pager.py11
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 ""
 	
ated pydoc documentation' href='/akspecs/ranger/commit/doc/pydoc/ranger.ext.get_all_modules.html?h=v1.4.3&id=b3556b21e23eb3381b220e0d3319d94b3a89e0ac'>b3556b21 ^
62cd83ba ^






f07bb12f ^









1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35