tools: stop live before starting it
If for some reason the device is still in live mode from an earlier invocation, stop live mode first before we attempt to start a new one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
43c844ea1e
commit
b40dee5900
|
@ -126,6 +126,9 @@ def run_live(request_fd_queue, conn_fd):
|
|||
manager = tuhi.dbusclient.TuhiDBusClientManager()
|
||||
|
||||
for device in manager.devices:
|
||||
if device.live:
|
||||
logger.info(f'{device} is already live, stopping first')
|
||||
device.stop_live()
|
||||
logger.info(f'starting live on {device}, please press button on the device')
|
||||
request_fd_queue.put(os.getpid())
|
||||
fd = reduction.recv_handle(conn_fd)
|
||||
|
|
Loading…
Reference in New Issue