[PATCH 2/2] Better error message when FETCH fails.
Sebastian Spaeth
Sebastian at SSpaeth.de
Mon Aug 15 10:00:07 BST 2011
We were not including the full server reply into our error message. Fix
that so we get better error logs.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
offlineimap/folder/IMAP.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py
index 6bb9cfb..3c1cfee 100644
--- a/offlineimap/folder/IMAP.py
+++ b/offlineimap/folder/IMAP.py
@@ -206,8 +206,9 @@ class IMAPFolder(BaseFolder):
if data == [None] or res_type != 'OK':
#IMAP server says bad request or UID does not exist
severity = OfflineImapError.ERROR.MESSAGE
- reason = "IMAP server '%s' responded with '%s' to fetching "\
- "message UID '%d'" % (self.getrepository(), res_type, uid)
+ reason = "IMAP server '%s' failed to fetch message UID '%d'."\
+ "Server responded: %s %s" % (self.getrepository(), uid,
+ res_type, data)
if data == [None]:
#IMAP server did not find a message with this UID
reason = "IMAP server '%s' does not have a message "\
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list