mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
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:
committed by
Christian Decker
parent
4b178621e2
commit
15aaf9f49a
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user