commit: 8c605f213a9c015886dc3923ee7131f50cd554cb
parent b2814c9a9720824dd31d61d3295598da6305ecc4
Author: Dor Askayo <dor.askayo@gmail.com>
Date: Mon, 23 May 2022 14:32:51 +0300
Ensure umount isn't called when self.mounted_tmpfs=False
This is accomplished by calling SysGeneral's __del__() method,
in which self.mounted_tmpfs is already checked.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sysc.py b/sysc.py
@@ -38,9 +38,8 @@ class SysC(SysGeneral):
if not self.chroot:
print(f"Deleting {self.dev_name}")
run('sudo', 'losetup', '-d', self.dev_name)
- print(f"Unmounting tmpfs from {self.tmp_dir}")
- umount(self.tmp_dir)
- os.rmdir(self.tmp_dir)
+
+ super().__del__()
def prepare(self):
"""