From 51629b8ffe4ec4f3af6b214ba86519c576b0fe7e Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Sun, 14 Aug 2011 10:42:21 +0200 Subject: [PATCH] Update example in code documentation of ui.error() sys.exc_traceback is long deprecated and is seems removed in python2.7, so document the legitimate use of sys.exc_info()[2] instead. Signed-off-by: Sebastian Spaeth Signed-off-by: Nicolas Sebrecht --- offlineimap/ui/UIBase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index c5f897f..c08d34c 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -92,7 +92,7 @@ class UIBase: error "msg", detailing at what point the error occurred. In debug mode, we also output the full traceback that occurred - if one has been passed in via sys.exc_traceback. + if one has been passed in via sys.info()[2]. Also save the Exception to a stack that can be output at the end of the sync run when offlineiamp exits. It is recommended to @@ -101,7 +101,7 @@ class UIBase: One example of such a call might be: - ui.error(exc, sys.exc_traceback, msg="While syncing Folder %s in " + ui.error(exc, sys.exc_info()[2], msg="While syncing Folder %s in " "repo %s") """ cur_thread = threading.currentThread()