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.
This commit is contained in:
Dor Askayo 2022-05-23 14:32:51 +03:00
parent b2814c9a97
commit 8c605f213a
1 changed files with 2 additions and 3 deletions

View File

@ -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):
"""