From 7e8af03933b196520a36ae1993b040888dc66951 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 16 May 2021 18:48:33 +1000 Subject: [PATCH] Show help if specifying invalid CLI subcommand --- pyRCV2/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyRCV2/__main__.py b/pyRCV2/__main__.py index 5e0e0ff..eb2f600 100644 --- a/pyRCV2/__main__.py +++ b/pyRCV2/__main__.py @@ -1,5 +1,5 @@ # pyRCV2: Preferential vote counting -# Copyright © 2020 Lee Yingtong Li (RunasSudo) +# Copyright © 2020–2021 Lee Yingtong Li (RunasSudo) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -27,3 +27,5 @@ args = parser.parse_args() if args.subcommand == 'stv': stv.main(args) +else: + parser.print_help()