Fix reporting invalid arguments

Argparse generally uses a return code of 2 for these situations.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
Bence Szépkúti
2025-10-14 15:09:11 +02:00
parent fc6b6426b4
commit fdb9b08cbb
+1 -2
View File
@@ -662,8 +662,7 @@ def run_main():
)
abi_args = parser.parse_args()
if os.path.isfile(abi_args.report_dir):
print("Error: {} is not a directory".format(abi_args.report_dir))
parser.exit()
parser.error("{} is not a directory".format(abi_args.report_dir))
old_version = SimpleNamespace(
version="old",
repository=abi_args.old_repo,