mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-21 14:29:41 +02:00
minor changes
This commit is contained in:
parent
eac5561b70
commit
71e9292d01
1 changed files with 8 additions and 4 deletions
|
@ -713,12 +713,13 @@ def clean():
|
||||||
break
|
break
|
||||||
# wait for clean
|
# wait for clean
|
||||||
log('PRESS KEY TO CLEAN', flush=True)
|
log('PRESS KEY TO CLEAN', flush=True)
|
||||||
wait_mouse_click()
|
screen.getch()
|
||||||
|
|
||||||
# check key is still here
|
# TODO: check key is still here
|
||||||
|
|
||||||
# Remove infected files
|
# Remove infected files
|
||||||
files_removed = 0
|
files_removed = 0
|
||||||
|
has_error = False
|
||||||
for file in infected_files:
|
for file in infected_files:
|
||||||
try:
|
try:
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
|
@ -728,11 +729,14 @@ def clean():
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
log(f"could not remove: {str(ex)}", flush=True)
|
log(f"could not remove: {str(ex)}", flush=True)
|
||||||
logging.info(f'not_removed="{file}, error="{str(ex)}"', exc_info=True)
|
logging.info(f'not_removed="{file}, error="{str(ex)}"', exc_info=True)
|
||||||
os.system("sync")
|
has_error = True
|
||||||
if not has_curses:
|
if not has_curses:
|
||||||
display_image("OK")
|
display_image("OK")
|
||||||
else:
|
else:
|
||||||
|
if not has_error:
|
||||||
log('Device cleaned !', flush=True)
|
log('Device cleaned !', flush=True)
|
||||||
|
else:
|
||||||
|
log('Device not cleaned !', flush=True)
|
||||||
logging.info(f'cleaned="{files_removed}/{len(infected_files)}"')
|
logging.info(f'cleaned="{files_removed}/{len(infected_files)}"')
|
||||||
else:
|
else:
|
||||||
if not has_curses:
|
if not has_curses:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue