From 4ab3d7ade15e83aaea8ad2f63f45ec8da6e0bb7b Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Tue, 27 Sep 2022 03:55:16 +0200 Subject: [PATCH] fastboot.py: raise exceptions on failure to boot and flash instead of calling exit(1) --- fastboot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fastboot.py b/fastboot.py index 97387c1..a2ce7a6 100644 --- a/fastboot.py +++ b/fastboot.py @@ -23,8 +23,7 @@ def fastboot_flash(partition, file): file, ]) if result.returncode != 0: - logging.info(f'Failed to flash {file}') - exit(1) + raise Exception(f'Failed to flash {file}') def fastboot_boot(file): @@ -35,5 +34,4 @@ def fastboot_boot(file): file, ]) if result.returncode != 0: - logging.fatal(f'Failed to boot {file} using fastboot') - exit(1) + raise Exception(f'Failed to boot {file} using fastboot')