summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-16 00:54:22 +0200
committerhut <hut@lavabit.com>2010-05-16 00:54:22 +0200
commit37a60686b340f030a2fc37e7ac9d19a701de9e6b (patch)
tree9fa53919bd63c30a803f092922b9c51f5d9bf932
parent572e74f28c63a2dce6268e0be3ec3df10ac58312 (diff)
downloadranger-37a60686b340f030a2fc37e7ac9d19a701de9e6b.tar.gz
core.loader: catch "select.error"s
-rw-r--r--ranger/core/loader.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index e5a136d0..e33c2e9e 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -75,11 +75,14 @@ class CommandLoader(Loadable, FileManagerAware):
 		if self.begin_hook:
 			self.begin_hook(process)
 		while process.poll() is None:
-			rd, _, __ = select.select(
-					[process.stderr], [], [], 0.05)
-			if rd:
-				error = process.stderr.readline().decode('utf-8')
-				self.fm.notify(error, bad=True)
+			try:
+				rd, _, __ = select.select(
+						[process.stderr], [], [], 0.05)
+				if rd:
+					error = process.stderr.readline().decode('utf-8')
+					self.fm.notify(error, bad=True)
+			except select.error:
+				pass
 			sleep(0.02)
 			yield
 		self.finished = True
href='#n116'>116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174