From c8baf0664e4d5017ad0ff50eb667a28471043fbe Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 23 Jan 2013 20:17:00 -0500 Subject: [PATCH] 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 --- rss2email/main.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.26.2