flash: partprobe the target as well
This commit is contained in:
parent
f0a9d3a670
commit
feadf6f1e8
1 changed files with 1 additions and 0 deletions
1
flash.py
1
flash.py
|
@ -47,6 +47,7 @@ def cmd_flash(what, location):
|
|||
sanitized_file = file.replace('-', '').replace('_', '').lower()
|
||||
if f'jumpdrive{location.split("-")[0]}' in sanitized_file:
|
||||
path = os.path.realpath(os.path.join(dir, file))
|
||||
partprobe(path)
|
||||
result = subprocess.run(['lsblk', path, '-o', 'SIZE'], capture_output=True)
|
||||
if result.returncode != 0:
|
||||
raise Exception(f'Failed to lsblk {path}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue