Fix reporting invalid arguments

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

Signed-off-by: Bence Szépkúti <[email protected]>
This commit is contained in:
Bence Szépkúti
2025-12-18 20:20:25 +01:00
parent fc6b6426b4
commit fdb9b08cbb
+1 -2
View File
@@ -662,8 +662,7 @@ def run_main():
) )
abi_args = parser.parse_args() abi_args = parser.parse_args()
if os.path.isfile(abi_args.report_dir): if os.path.isfile(abi_args.report_dir):
print("Error: {} is not a directory".format(abi_args.report_dir)) parser.error("{} is not a directory".format(abi_args.report_dir))
parser.exit()
old_version = SimpleNamespace( old_version = SimpleNamespace(
version="old", version="old",
repository=abi_args.old_repo, repository=abi_args.old_repo,