mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 17:53:00 +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:
|
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…
Add table
Add a link
Reference in a new issue