From cd9aa73c8463fa0214d6ee6109c63396e623dbaa Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sun, 26 Jun 2016 12:26:11 -0700 Subject: Catch select errors while capturing test fixture logs --- test/service.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/service.py') diff --git a/test/service.py b/test/service.py index 55cc739..8895a10 100644 --- a/test/service.py +++ b/test/service.py @@ -72,7 +72,13 @@ class SpawnedService(threading.Thread): def run(self): self._spawn() while True: - (rds, _, _) = select.select([self.child.stdout, self.child.stderr], [], [], 1) + try: + (rds, _, _) = select.select([self.child.stdout, self.child.stderr], [], [], 1) + except select.error as ex: + if ex.args[0] == 4: + continue + else: + raise if self.child.stdout in rds: line = self.child.stdout.readline() -- cgit v1.2.1