From 972804b81edb242716d6fb1b57c9584832b4e8e1 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Fri, 21 Jun 2024 22:41:16 +0000 Subject: [PATCH] Fix a bug in the releasetools common.py script. The script was not breaking out of the loop when a handler was found, which could lead to multiple handlers being called for the same option. This fixes the issue that a single option can be handled in two handlers. Bug: 345402175 Test: sign_target_files_apks -k .. Change-Id: I9f4ef801df99a4a0f2ba5be994b3f37fbedc22c0 --- tools/releasetools/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index a949c11742..4834834bcc 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -2788,6 +2788,7 @@ def ParseOptions(argv, break elif handler(o, a): success = True + break if not success: raise ValueError("unknown option \"%s\"" % (o,))