From 13030b331cadd2617460c91297ab71b31438afa8 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Thu, 24 Oct 2024 19:51:00 +0200 Subject: [PATCH] build: Do not enable argparse exception on Python < 3.9 --- ns3 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ns3 b/ns3 index f5c356359..3bc2ddfda 100755 --- a/ns3 +++ b/ns3 @@ -90,8 +90,11 @@ def add_argument_to_subparsers( def parse_args(argv): + py39args = {"exit_on_error": False} + if sys.version_info < (3, 9): + py39args = {} parser = argparse.ArgumentParser( - description="ns-3 wrapper for the CMake build system", add_help=False, exit_on_error=False + description="ns-3 wrapper for the CMake build system", add_help=False, **py39args ) sub_parser = parser.add_subparsers()