diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 2c30b94..8558421 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -124,6 +124,11 @@ class UIBase(object): of the sync run when offlineiamp exits. It is recommended to always pass in exceptions if possible, so we can give the user the best debugging info. + + We are always pushing tracebacks to the exception queue to + make them to be output at the end of the run to allow users + pass sensible diagnostics to the developers or to solve + problems by themselves. One example of such a call might be: @@ -135,13 +140,14 @@ class UIBase(object): else: self._msg("ERROR: %s" % (exc)) + instant_traceback = exc_traceback if not self.debuglist: # only output tracebacks in debug mode - exc_traceback = None + instant_traceback = None # push exc on the queue for later output self.exc_queue.put((msg, exc, exc_traceback)) - if exc_traceback: - self._msg(traceback.format_tb(exc_traceback)) + if instant_traceback: + self._msg(traceback.format_tb(instant_traceback)) def registerthread(self, account): """Register current thread as being associated with an account name"""