From: Jeremy Kerr Date: Sun, 27 Mar 2016 04:53:04 +0000 (+0800) Subject: parsemail: Fix default value of verbosity argument X-Git-Tag: v1.1.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3660e811969cd8e786b37434b48b469721fad01;p=thirdparty%2Fpatchwork.git parsemail: Fix default value of verbosity argument With the current parsemail.py, the default value for the verbosity argument does not exist in the VERBOSITY_LEVELS dict, so we get: Traceback (most recent call last): File "./patchwork/bin/parsemail.py", line 569, in sys.exit(main(sys.argv)) File "./patchwork/bin/parsemail.py", line 555, in main logging.basicConfig(level=VERBOSITY_LEVELS[args['verbosity']]) KeyError: 20 This change uses an actual key instead. Signed-off-by: Jeremy Kerr Acked-by: Stephen Finucane --- diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py index b32ef0b2..7a9e0091 100755 --- a/patchwork/bin/parsemail.py +++ b/patchwork/bin/parsemail.py @@ -548,7 +548,7 @@ def main(args): group.add_argument('--list-id', help='mailing list ID. If not supplied ' 'this will be extracted from the mail headers.') group.add_argument('--verbosity', choices=list_logging_levels(), - help='debug level', default=logging.INFO) + help='debug level', default='info') args = vars(parser.parse_args())