write tests for streamer
This commit is contained in:
@ -173,7 +173,7 @@ class Streamer:
|
||||
|
||||
self.check_zombie_process()
|
||||
self.process = subprocess.Popen(args, stderr=subprocess.STDOUT)
|
||||
atexit.register(lambda: self.kill_process())
|
||||
atexit.register(self.kill_process)
|
||||
|
||||
def kill_process(self):
|
||||
if self.process:
|
||||
@ -184,6 +184,7 @@ class Streamer:
|
||||
)
|
||||
self.process.kill()
|
||||
self.process = None
|
||||
atexit.unregister(self.kill_process)
|
||||
|
||||
def wait_process(self):
|
||||
"""Wait for the process to terminate if there is a process."""
|
||||
|
Reference in New Issue
Block a user