[PATCH 5/5] Update example in code documentation of ui.error()

Sebastian Spaeth Sebastian at SSpaeth.de
Sun Aug 14 09:42:21 BST 2011

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 <Sebastian at SSpaeth.de>
 offlineimap/ui/UIBase.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py
index a385f2a..f49588a 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()

More information about the OfflineIMAP-project mailing list