Fix block devices

This commit is contained in:
Filip Stedronsky 2021-07-29 17:30:21 +02:00
parent 8515bf4d6e
commit f3e320f6cf

View File

@ -40,7 +40,8 @@ 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():
pass subprocess.run(['partprobe', dev])
yield dev
def ci_lookup(base, *comps, creating=False, parents=False): def ci_lookup(base, *comps, creating=False, parents=False):
"""Lookup path components case-insensitively""" """Lookup path components case-insensitively"""