diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-11-26 16:33:48 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-11-26 16:33:48 -0300 |
commit | 9fd987bb876171e419213bd710e4656ce86d73a6 (patch) | |
tree | 90d9c4853d59d801f42eeb64301dae0a45b9a7fa /mail/src/leap | |
parent | a2e5041f87716d10e28e97428188e29506f2e089 (diff) | |
parent | 61e84cee60ef1490ddf3bd82eec1d20e8e294ceb (diff) |
Merge remote-tracking branch 'refs/remotes/kali/bug/mailbox-fixes' into develop
Diffstat (limited to 'mail/src/leap')
-rw-r--r-- | mail/src/leap/mail/imap/server.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py index bb2830d9..733944c6 100644 --- a/mail/src/leap/mail/imap/server.py +++ b/mail/src/leap/mail/imap/server.py @@ -1438,12 +1438,14 @@ class SoledadMailbox(WithMsgFields): """ # XXX we should treat the message as an IMessage from here uid_next = self.getUIDNext() - flags = tuple(str(flag) for flag in flags) + if flags is None: + flags = tuple() + else: + flags = tuple(str(flag) for flag in flags) self.messages.add_msg(message, flags=flags, date=date, uid=uid_next) - # XXX recent should not include deleted...?? exists = len(self.messages) recent = len(self.messages.get_recent()) for listener in self.listeners: @@ -1512,7 +1514,10 @@ class SoledadMailbox(WithMsgFields): except TypeError: # looks like we cannot iterate last = self.messages.get_last() - uid_last = last.getUID() + if last is None: + uid_last = 1 + else: + uid_last = last.getUID() messages.last = uid_last # for sequence numbers (uid = 0) |