Properly call error() function from ui.UIBase

Second argument is exception traceback, not the message; without this
tracebacks like mentioned in
  http://permalink.gmane.org/gmane.mail.imap.offlineimap.general/5712
were happening when this exception handling block was hit.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
Eygene Ryabinkin 2013-08-30 21:44:46 +04:00
parent f2c858330f
commit 69765a3ef0

View File

@ -384,9 +384,9 @@ class BaseFolder(object):
raise # bubble severe errors up raise # bubble severe errors up
self.ui.error(e, exc_info()[2]) self.ui.error(e, exc_info()[2])
except Exception as e: except Exception as e:
self.ui.error(e, "Copying message %s [acc: %s]:\n %s" %\ self.ui.error(e, exc_info()[2],
(uid, self.accountname, msg="Copying message %s [acc: %s]" %\
exc_info()[2])) (uid, self.accountname))
raise #raise on unknown errors, so we can fix those raise #raise on unknown errors, so we can fix those
def syncmessagesto_copy(self, dstfolder, statusfolder): def syncmessagesto_copy(self, dstfolder, statusfolder):