Skip to content

Commit cd9aa73

Browse files
committed
Catch select errors while capturing test fixture logs
1 parent d179a3f commit cd9aa73

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/service.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ def _despawn(self):
7272
def run(self):
7373
self._spawn()
7474
while True:
75-
(rds, _, _) = select.select([self.child.stdout, self.child.stderr], [], [], 1)
75+
try:
76+
(rds, _, _) = select.select([self.child.stdout, self.child.stderr], [], [], 1)
77+
except select.error as ex:
78+
if ex.args[0] == 4:
79+
continue
80+
else:
81+
raise
7682

7783
if self.child.stdout in rds:
7884
line = self.child.stdout.readline()

0 commit comments

Comments
 (0)