]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parsearchive: Fix default value of verbosity argument
authorStephen Finucane <stephen.finucane@intel.com>
Fri, 1 Apr 2016 12:54:57 +0000 (13:54 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 1 Apr 2016 12:54:57 +0000 (13:54 +0100)
With the current parsearchive.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 <module>
      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: Stephen Finucane <stephen.finucane@intel.com>
patchwork/bin/parsearchive.py

index a10d9d639fcc5957bf440fe0033975edaeda3d27..0149275a13dac2adfa6723bf3c8b398fdfe42e03 100755 (executable)
@@ -69,7 +69,7 @@ def main():
     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())