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
4 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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208