mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-25 08:19:41 +02:00
work on messages
This commit is contained in:
parent
b6f02e181a
commit
38251fdc8f
1 changed files with 5 additions and 0 deletions
|
@ -548,17 +548,22 @@ class PandoraBox:
|
|||
self._log('PRESS KEY TO CLEAN')
|
||||
self.screen.getch()
|
||||
# Remove infected files
|
||||
files_removed = 0
|
||||
for file in self.infected_files:
|
||||
try :
|
||||
os.remove(file)
|
||||
self._log(f"{file} removed")
|
||||
logging.info(f'removed="{file}"')
|
||||
files_removed += 1
|
||||
except Exception as ex :
|
||||
self._log(f"Unexpected error: {str(ex)}")
|
||||
logging.info(f'error="{str(ex)}"', exc_info=True)
|
||||
os.system("sync")
|
||||
if not self.has_curses:
|
||||
self.display_image("OK")
|
||||
else
|
||||
self._log('Device cleaned !')
|
||||
logging.info(f'cleaned="{files_removed}/{len(self.infected_files)}"')
|
||||
else:
|
||||
if not self.has_curses:
|
||||
self.display_image("OK")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue