Add sleep for partition scan

This commit is contained in:
Filip Stedronsky 2021-07-29 22:56:24 +02:00
parent 1c70d2e859
commit 0bff628bc3

View File

@ -39,7 +39,9 @@ def with_device(pth):
finally: finally:
subprocess.run(['losetup', '-d', dev]) subprocess.run(['losetup', '-d', dev])
elif pth.is_block_device(): elif pth.is_block_device():
time.sleep(1)
subprocess.run(['partprobe', pth]) subprocess.run(['partprobe', pth])
time.sleep(1)
yield pth yield pth
def ci_lookup(base, *comps, creating=False, parents=False): def ci_lookup(base, *comps, creating=False, parents=False):