From e68df40ca3aca72c7e354d8a46aa4b9b7e91f358 Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 12 Jul 2023 16:27:42 +0100 Subject: remove unnecessary argparse arguments you don't need to specify --help if no arguments, that's the default behaviour --- walker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/walker.py b/walker.py index d98be8f..803885e 100644 --- a/walker.py +++ b/walker.py @@ -10,7 +10,7 @@ from binascii import unhexlify parser = argparse.ArgumentParser() parser.add_argument('-cid', help='content id, &cid={...}. see url when reading a chapter') parser.add_argument('-nolog', help='no progressive download logs on terminal', action="store_true") -args = parser.parse_args(args=None if sys.argv[1:] else ['--help']) +args = parser.parse_args() if args.cid == None: parser.print_help() -- cgit v1.2.3-70-g09d2