From: W. Trevor King Date: Thu, 24 Jan 2013 01:17:00 +0000 (-0500) Subject: main: Show traceback when we're extra verbose X-Git-Tag: v3.0~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c8baf0664e4d5017ad0ff50eb667a28471043fbe;p=rss2email.git main: Show traceback when we're extra verbose Adding --verbose (or -V) flags moves the logger from ERROR to WARNING (-V), INFO (-VV), and DEBUG (-VVV). Additional increments were ignored, but I don't like always masking tracebacks. This patch sets an additional verbosity level (-VVVV) which logs at DEBUG and additionally prints exception tracebacks instead of hiding them. Signed-off-by: W. Trevor King --- diff --git a/rss2email/main.py b/rss2email/main.py index 74ccd30..9e64848 100644 --- a/rss2email/main.py +++ b/rss2email/main.py @@ -163,6 +163,8 @@ def run(*args, **kwargs): args.func(feeds=feeds, args=args) except _error.RSS2EmailError as e: e.log() + if _logging.ERROR - 10 * args.verbose < _logging.DEBUG: + raise # don't mask the traceback _sys.exit(1)