diff options
author | hut <hut@lavabit.com> | 2010-05-16 00:54:22 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-16 00:54:22 +0200 |
commit | 37a60686b340f030a2fc37e7ac9d19a701de9e6b (patch) | |
tree | 9fa53919bd63c30a803f092922b9c51f5d9bf932 /ranger | |
parent | 572e74f28c63a2dce6268e0be3ec3df10ac58312 (diff) | |
download | ranger-37a60686b340f030a2fc37e7ac9d19a701de9e6b.tar.gz |
core.loader: catch "select.error"s
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/loader.py | 13 |
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 |