[PATCH] parsemail: Correct issue with '--verbosity' flag

Stephen Finucane stephen.finucane at intel.com
Fri Mar 11 22:28:41 AEDT 2016


Use the log level dictionary _values_, not the user-provided _key_.

Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
Closes-Bug: #21
---
 patchwork/bin/parsearchive.py | 2 +-
 patchwork/bin/parsemail.py    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/patchwork/bin/parsearchive.py b/patchwork/bin/parsearchive.py
index 33cb5cb..a10d9d6 100755
--- a/patchwork/bin/parsearchive.py
+++ b/patchwork/bin/parsearchive.py
@@ -73,7 +73,7 @@ def main():
 
     args = vars(parser.parse_args())
 
-    logging.basicConfig(level=args['verbosity'])
+    logging.basicConfig(level=VERBOSITY_LEVELS[args['verbosity']])
 
     parse_mbox(args['inpath'], args['list_id'])
 
diff --git a/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py
index d93c623..b32ef0b 100755
--- a/patchwork/bin/parsemail.py
+++ b/patchwork/bin/parsemail.py
@@ -552,7 +552,7 @@ def main(args):
 
     args = vars(parser.parse_args())
 
-    logging.basicConfig(level=args['verbosity'])
+    logging.basicConfig(level=VERBOSITY_LEVELS[args['verbosity']])
 
     mail = message_from_file(args['infile'])
     try:
-- 
2.0.0



More information about the Patchwork mailing list