Skip to content

Commit

Permalink
error handling for --print-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
rvykydal committed Apr 19, 2024
1 parent 647da2f commit 508ea08
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/generate-permian-query.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def parse_args():
nargs=1, action="append", help="skip tests with TYPE (tag)")
_parser.add_argument("--testtype", "-t", type=str, metavar="TYPE",
help="only run tests with TYPE (tag)")
_parser.add_argument("--platform", "-p", type=str, metavar="PLATFORM",
_parser.add_argument("--platform", "-p", type=str, metavar="PLATFORM", default="",
help="platform to be used for tests")
_parser.add_argument("--print-platform", action="store_true",
help="print the platform option")
Expand All @@ -27,8 +27,11 @@ def parse_args():
args = parse_args()

if args.print_platform:
print(args.platform)
exit()
if args.platform:
print(args.platform)
exit()
else:
exit(1)

conditions = []
if args.tests:
Expand Down

0 comments on commit 508ea08

Please sign in to comment.