[PATCH] Fix string formatting
Sebastian at SSpaeth.de
Mon Aug 22 16:22:41 BST 2011
We were omitting an '%' where we needed it. Also include the traceback
information where it belongs in the new ui.error infrastructure.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
This was discovered as Vincent reported an exception that complained about
"str() not callable". This was due to us omitting the % before the list of
string formatting arguments. This patch slightly cleans up the output and
fixes that bug so we have nicer exceptions back.
offlineimap/folder/Base.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/offlineimap/folder/Base.py b/offlineimap/folder/Base.py
index 09837ff..5bd8061 100644
@@ -436,7 +436,6 @@ class BaseFolder(object):
except Exception, e:
- self.ui.error(e, msg = "ERROR attempting to sync folder %s "
- "[acc: %s]:\n %s" (self, self.getaccountname(),
+ self.ui.error(e, exc_info(), "Syncing folder %s [acc: %s]" %\
+ (self, self.getaccountname()))
raise # raise unknown Exceptions so we can fix them
More information about the OfflineIMAP-project