Fixing possible race condition with partprobe (#796)
* Update partition.py * Added sleep after partprobe Added sleep after partprobe. Without this tools such as lsblk may be unable to retrieve certain properties of devices (such as partuuid).
This commit is contained in:
parent
c0b83e7f2f
commit
b0c8346fa7
|
|
@ -127,6 +127,7 @@ class Filesystem:
|
|||
|
||||
def partprobe(self):
|
||||
SysCommand(f'bash -c "partprobe"')
|
||||
time.sleep(1)
|
||||
|
||||
def raw_parted(self, string: str):
|
||||
if (cmd_handle := SysCommand(f'/usr/bin/parted -s {string}')).exit_code != 0:
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ class Partition:
|
|||
|
||||
def partprobe(self):
|
||||
SysCommand(f'bash -c "partprobe"')
|
||||
time.sleep(1)
|
||||
|
||||
def detect_inner_filesystem(self, password):
|
||||
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=logging.INFO)
|
||||
|
|
|
|||
Loading…
Reference in New Issue