mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 13:29:42 +02:00
handle exceptions
This commit is contained in:
parent
f596ed0ebc
commit
ab594c92ef
1 changed files with 4 additions and 5 deletions
|
@ -299,10 +299,9 @@ def mount_device(device):
|
|||
"""Unmount USB device"""
|
||||
def umount_device():
|
||||
if not USB_AUTO_MOUNT:
|
||||
if os.path.exists("/media/box"):
|
||||
log("Unmounting device /media/box")
|
||||
res = os.system("pumount /media/box")
|
||||
# print("Return type: ", res)
|
||||
|
||||
|
||||
"""Main device loop"""
|
||||
def device_loop():
|
||||
|
@ -462,9 +461,9 @@ def scan(mount_point, used):
|
|||
shutil.copyfile(full_path, os.path.join(quanrantine_folder,file))
|
||||
except Exception as e :
|
||||
log("Unexpected error: %s" % e)
|
||||
log("Scan failed !")
|
||||
if not CURSES:
|
||||
display_image("ERROR")
|
||||
waitMouseClick()
|
||||
raise
|
||||
update_bar(100)
|
||||
log("Scan done in %ds, %d files scanned, %d files infected" %
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue