Skip to content

Commit

Permalink
main: display kirk version more pythonic way
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Roxell <[email protected]>
  • Loading branch information
roxell committed Jun 12, 2024
1 parent 5e8c806 commit 9019164
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libkirk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ def run(cmd_args: list = None) -> None:
parser.add_argument(
"--version",
"-V",
action="store_true",
help="Print current version")
action="version",
version=f"%(prog)s, {libkirk.VERSION}")

# user interface arguments
parser.add_argument(
Expand Down Expand Up @@ -453,10 +453,6 @@ def run(cmd_args: list = None) -> None:
# parse comand line
args = parser.parse_args(cmd_args)

if args.version:
print(f"kirk {libkirk.VERSION}")
parser.exit(RC_OK)

if args.sut and "help" in args.sut:
print(args.sut["help"])
parser.exit(RC_OK)
Expand Down

0 comments on commit 9019164

Please sign in to comment.