test_lightning.py: shutdown tail thread before killing.

Seems to avoid the nasty python resource warnings, as well as the
fatal 'ValueError: PyMemoryView_FromBuffer(): info->buf must not be NULL'

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-01-18 06:59:50 +10:30
committed by Christian Decker
parent 4b178621e2
commit 15aaf9f49a
2 changed files with 9 additions and 3 deletions

View File

@@ -85,6 +85,12 @@ class TailableProc(object):
return self.proc.returncode
def kill(self):
"""Kill process without giving it warning."""
self.proc.kill()
self.proc.wait()
self.thread.join()
def tail(self):
"""Tail the stdout of the process and remember it.