1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 05:19:40 +02:00

fix invalid labels

This commit is contained in:
dbarzin 2023-03-07 11:25:00 +01:00
parent b4dd552141
commit fc702e29b8

View file

@ -728,7 +728,7 @@ def clean():
log('PRESS KEY TO CLEAN', flush=True)
screen.getch()
# TODO: check key is still here
# TODO: check device is still present
# Remove infected files
files_removed = 0
@ -748,20 +748,26 @@ def clean():
f'not_removed="{file}, '
f'error="{str(ex)}"', exc_info=True)
has_error = True
if not has_curses:
display_image("OK")
else:
umount_device()
if not has_error:
if has_curses:
log('Device cleaned !', flush=True)
else:
display_image("OK")
else:
if has_curses:
log('Device not cleaned !', flush=True)
else:
display_image("ERROR")
wait_mouse_click()
logging.info(
f'hostname="{hostname}", '
f'cleaned="{files_removed}/{len(infected_files)}"')
else:
if not has_curses:
display_image("OK")
umount_device()
return "WAIT"