From feadf6f1e8c344912722543c388e5188e1d480a4 Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Sun, 13 Feb 2022 18:48:48 +0100 Subject: [PATCH] flash: partprobe the target as well --- flash.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flash.py b/flash.py index e0934d4..f3e16ea 100644 --- a/flash.py +++ b/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}')