mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-22 23:09:41 +02:00
handle errors
This commit is contained in:
parent
86cf18bb5c
commit
185b3c7c71
1 changed files with 2 additions and 6 deletions
|
@ -719,10 +719,6 @@ def clean():
|
||||||
wait_mouse_click()
|
wait_mouse_click()
|
||||||
|
|
||||||
# check key is still here
|
# check key is still here
|
||||||
try:
|
|
||||||
log(f'{str(device.get("ID_FS_LABEL"))}', flush=True)
|
|
||||||
except Exception:
|
|
||||||
return "WAIT"
|
|
||||||
|
|
||||||
# Remove infected files
|
# Remove infected files
|
||||||
files_removed = 0
|
files_removed = 0
|
||||||
|
@ -733,8 +729,8 @@ def clean():
|
||||||
logging.info(f'removed="{file}"')
|
logging.info(f'removed="{file}"')
|
||||||
files_removed += 1
|
files_removed += 1
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
log(f"Unexpected error: {str(ex)}", flush=True)
|
log(f"could not remove: {str(ex)}", flush=True)
|
||||||
logging.info(f'error="{str(ex)}"', exc_info=True)
|
logging.info(f'not_removed="{file}, error="{str(ex)}"', exc_info=True)
|
||||||
os.system("sync")
|
os.system("sync")
|
||||||
if not has_curses:
|
if not has_curses:
|
||||||
display_image("OK")
|
display_image("OK")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue