diff options
author | Kali Kaneko <kali@leap.se> | 2013-11-26 16:46:58 -0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-11-26 17:20:53 -0200 |
commit | 253ff4a9c236e35587978e40531021c0f824756b (patch) | |
tree | 7a8d2964a85217c88c481c14ea502d55cc7abe5a /src/leap/mail/imap | |
parent | dde25bffadd0fee6a60ba597148363008797e937 (diff) |
Fix fetch iteration on empty folder
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r-- | src/leap/mail/imap/server.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py index bb2830d..abe1dfa 100644 --- a/src/leap/mail/imap/server.py +++ b/src/leap/mail/imap/server.py @@ -1512,7 +1512,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) |