mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-09 21:05:24 +01:00
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
1 changed files with 2 additions and 3 deletions
5
sysc.py
5
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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue