remove backup mount dir after unmounting (#587)
This commit is contained in:
parent
29e386c6bf
commit
0801ee3c9c
@ -64,6 +64,8 @@ def umount_device(dev_mount_path):
|
|||||||
pumount_cmd = ["pumount", "--luks-force", dev_mount_path]
|
pumount_cmd = ["pumount", "--luks-force", dev_mount_path]
|
||||||
res = subprocess.check_call(pumount_cmd)
|
res = subprocess.check_call(pumount_cmd)
|
||||||
if res == 0:
|
if res == 0:
|
||||||
|
if dev_mount_path.startswith('/media/backup'):
|
||||||
|
os.rmdir(dev_mount_path)
|
||||||
dev_mount_path = None
|
dev_mount_path = None
|
||||||
return dev_mount_path
|
return dev_mount_path
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
Loading…
Reference in New Issue
Block a user