From 37a60686b340f030a2fc37e7ac9d19a701de9e6b Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 16 May 2010 00:54:22 +0200 Subject: core.loader: catch "select.error"s --- ranger/core/loader.py | 13 ++++++++----- 1 file 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 -- cgit 1.4.1-2-gfad0 @tilde.institute>
summary refs log tree commit diff stats
path: root/TODO
blob: 169fa6d6cab91a0f593895a3e9bebb7499c7571b (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102