From 0e416d528767a1246c72ae1efa917e401cedd79f Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Mon, 8 Jun 2015 23:26:51 -0700 Subject: Dont try to terminate a child that has already exited in test/service _despawn --- test/service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/service.py') diff --git a/test/service.py b/test/service.py index 9368b85..b986a71 100644 --- a/test/service.py +++ b/test/service.py @@ -59,7 +59,8 @@ class SpawnedService(threading.Thread): self.alive = True def _despawn(self): - self.child.terminate() + if self.child.poll() is None: + self.child.terminate() self.alive = False for _ in range(50): if self.child.poll() is not None: -- cgit v1.2.1