Skip to content

Commit

Permalink
Merge pull request #686 from bnbarham/fix-for-old-python
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmishal authored Jan 27, 2024
2 parents b9cb53f + c70ff3f commit 6c5ccd9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ def add_common_args(parser: argparse.ArgumentParser) -> None:

def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(prog="build-script-helper.py")
subparsers = parser.add_subparsers(
title="subcommands", dest="action", required=True, metavar="action"
)
if sys.version_info >= (3, 7, 0):
subparsers = parser.add_subparsers(title="subcommands", dest="action", required=True, metavar="action")
else:
subparsers = parser.add_subparsers(title="subcommands", dest="action", metavar="action")

build_parser = subparsers.add_parser("build", help="build the package")
add_common_args(build_parser)
Expand Down

0 comments on commit 6c5ccd9

Please sign in to comment.