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:
parent
b2814c9a97
commit
8c605f213a
5
sysc.py
5
sysc.py
|
@ -38,9 +38,8 @@ class SysC(SysGeneral):
|
||||||
if not self.chroot:
|
if not self.chroot:
|
||||||
print(f"Deleting {self.dev_name}")
|
print(f"Deleting {self.dev_name}")
|
||||||
run('sudo', 'losetup', '-d', self.dev_name)
|
run('sudo', 'losetup', '-d', self.dev_name)
|
||||||
print(f"Unmounting tmpfs from {self.tmp_dir}")
|
|
||||||
umount(self.tmp_dir)
|
super().__del__()
|
||||||
os.rmdir(self.tmp_dir)
|
|
||||||
|
|
||||||
def prepare(self):
|
def prepare(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue