From 2180f5fbf4d49c5f54b18918943bae22c079ae04 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Thu, 16 Jun 2011 17:22:29 +0200 Subject: [PATCH] UIDMappedFolder.savemessage() returned nothing, breaking API conventions Folder.savemessage() is supposed to return the new UID that a backend assigned, and it BaseFolder.copymessageto() fails if we don't return a non-negative number in the savemessage() there. For some reason, the UIDMappedFolder was not returning anything in savemessage, despite clearly stating in the code docs that it is supposed to return a UID. Not sure how long this has already been the case. This patch fixes the UIDMappedFolder to behave as it should. Signed-off-by: Sebastian Spaeth Signed-off-by: Nicolas Sebrecht --- offlineimap/folder/UIDMaps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/offlineimap/folder/UIDMaps.py b/offlineimap/folder/UIDMaps.py index 76c5ee4..5f770ce 100644 --- a/offlineimap/folder/UIDMaps.py +++ b/offlineimap/folder/UIDMaps.py @@ -197,6 +197,7 @@ class MappingFolderMixIn: self._savemaps(dolock = 0) finally: self.maplock.release() + return uid def getmessageflags(self, uid): return self._mb.getmessageflags(self, self.r2l[uid])