Dont try to terminate a child that has already exited in test/service _despawn

This commit is contained in:
Dana Powers
2015-06-08 23:26:51 -07:00
parent 53d8251a18
commit 0e416d5287

View File

@@ -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: