[PATCH 1/3] Format to string rather than print tracebacks to stdout

Sebastian Spaeth Sebastian at SSpaeth.de
Tue Jun 14 10:52:04 BST 2011


We want to be able to log the traceback to the debug log files, so we need
to format the traceback to a string, rather than printing it out to stdout.

Fixing this oversight.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/ui/UIBase.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py
index bf5c713..13ecb20 100644
--- a/offlineimap/ui/UIBase.py
+++ b/offlineimap/ui/UIBase.py
@@ -115,7 +115,7 @@ class UIBase:
         # push exc on the queue for later output
         self.exc_queue.put((msg, exc, exc_traceback))
         if exc_traceback:
-            self._msg(traceback.print_tb(exc_traceback))
+            self._msg(traceback.format_tb(exc_traceback))
 
     def registerthread(s, account):
         """Provides a hint to UIs about which account this particular
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list