From cfde07c9c69d36a2ae655979bd4cbeb7b165565b Mon Sep 17 00:00:00 2001 From: dbarzin Date: Mon, 13 Mar 2023 11:10:34 +0100 Subject: [PATCH] umount --- pandora-box.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora-box.py b/pandora-box.py index 8d67464..93babfd 100755 --- a/pandora-box.py +++ b/pandora-box.py @@ -602,6 +602,8 @@ def scan(): def wait(): """Wait for insert of remove of USB device""" + # handle error - first unmount the device + umount_device() # Loop context = pyudev.Context() monitor = pyudev.Monitor.from_netlink(context) @@ -719,7 +721,7 @@ def clean(): break # wait for clean log('PRESS KEY TO CLEAN', flush=True) - screen.getch() + wait_mouse_click() # TODO: check device is still present