Skip to content

Commit

Permalink
Replace store_true action with version in app.py flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kencx committed Jul 5, 2023
1 parent da0e702 commit dc70bbe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"-b", "--bind", required=False, type=str, help="Bind address HOST:PORT"
)
parser.add_argument(
"-v", "--version", required=False, action="store_true", help="Print version"
"-v",
"--version",
action="version",
version=f"v{__version__}",
help="Print version",
)
args = parser.parse_args()

if args.version:
print(__version__)
exit(0)

if args.dev:
app_config = DevConfig(
calibredb=args.calibre,
Expand Down

0 comments on commit dc70bbe

Please sign in to comment.