summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2015-06-08 23:26:51 -0700
committerDana Powers <dana.powers@rd.io>2015-06-08 23:27:09 -0700
commit0e416d528767a1246c72ae1efa917e401cedd79f (patch)
treedb61c1986646bc970c025902ea38b93c4545b675 /test
parent53d8251a18d9c033269e105854a7c4cc9730930a (diff)
downloadkafka-python-0e416d528767a1246c72ae1efa917e401cedd79f.tar.gz
Dont try to terminate a child that has already exited in test/service _despawn
Diffstat (limited to 'test')
-rw-r--r--test/service.py3
1 files changed, 2 insertions, 1 deletions
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: