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 | 00ae014d87f0d64dc213118a41e7f7e502b4e064 (patch) | |
tree | 4b1a129092d64d3f38ee602206e0aaa6b784a85e /src | |
parent | dde25bffadd0fee6a60ba597148363008797e937 (diff) | |
parent | 5f08775a4aace0859d4ad2539b07ad612fec4b7b (diff) |
Merge remote-tracking branch 'refs/remotes/kali/bug/mailbox-fixes' into develop
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/mail/imap/server.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py index bb2830d..733944c 100644 --- a/src/leap/mail/imap/server.py +++ b/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) |