From 66ed06fb29b5f2a97dc59a160d08a4f4ddf86282 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Wed, 7 Apr 2021 14:56:09 -0400 Subject: [PATCH] Re-raise exceptions instead of sys.exit If we call sys.exit(), code in finally block won't be executed. Test: th Change-Id: I1f743c9385218742def3b925427942cb1d5bd031 --- tools/releasetools/sign_target_files_apks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index 3db5559741..22c6ac46c1 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -1383,6 +1383,6 @@ if __name__ == '__main__': main(sys.argv[1:]) except common.ExternalError as e: print("\n ERROR: %s\n" % (e,)) - sys.exit(1) + raise finally: common.Cleanup()