1
0
Fork 0

Fixed issue with exception when IMAP transport returned no messages.

--HG--
branch : ashvetsov/fixes-to-push
extra : source : b9b283ff46d734933c4a715630e114d5e250a34b
This commit is contained in:
ashvetsov 2013-04-11 15:48:49 +04:00
parent e6f9e6b94b
commit 8ab0f708c5

View file

@ -21,6 +21,10 @@ class ImapTransport(object):
def get_message(self):
typ, inbox = self.server.search(None, 'ALL')
if not inbox[0]:
return
for key in inbox[0].split():
try:
typ, msg_contents = self.server.fetch(key, '(RFC822)')