diff options
| author | Kali Kaneko <kali@leap.se> | 2014-02-20 01:21:46 -0400 | 
|---|---|---|
| committer | Kali Kaneko <kali@leap.se> | 2014-02-20 11:50:10 -0400 | 
| commit | b0bbedcb041c2e13c3cb7f989c3c7dadd8f28257 (patch) | |
| tree | 37dc52020477761cb00b77fcf4c3bb783375cfab | |
| parent | 7324138407055efcb7863b24661dcb348aa67ae3 (diff) | |
catch stopiteration
| -rw-r--r-- | mail/src/leap/mail/imap/soledadstore.py | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/mail/src/leap/mail/imap/soledadstore.py b/mail/src/leap/mail/imap/soledadstore.py index e047e2e..25f00bb 100644 --- a/mail/src/leap/mail/imap/soledadstore.py +++ b/mail/src/leap/mail/imap/soledadstore.py @@ -281,9 +281,13 @@ class SoledadStore(ContentDedup):          def doSoledadCalls(items):              # we prime the generator, that should return the              # message or flags wrapper item in the first place. -            doc_wrapper = items.next() -            failed = self._soledad_write_document_parts(items) -            queueNotifyBack(failed, doc_wrapper) +            try: +                doc_wrapper = items.next() +            except StopIteration: +                pass +            else: +                failed = self._soledad_write_document_parts(items) +                queueNotifyBack(failed, doc_wrapper)          doSoledadCalls(self._iter_wrapper_subparts(doc_wrapper)) | 
