fastboot.py: raise exceptions on failure to boot and flash instead of calling exit(1)

This commit is contained in:
InsanePrawn 2022-09-27 03:55:16 +02:00
parent c4900cfd00
commit 4ab3d7ade1

View file

@ -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')