diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-12 12:42:02 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-17 11:39:50 -0400 |
commit | ac4c70f0be36c985e16e3f4ec0a38ef6f8d48166 (patch) | |
tree | b6e62c041f7131f86543efebf6ac873ecb0efe8d /src/leap/mail/imap/messageparts.py | |
parent | b520a60d0e48f36dcebe03d19b65839afc460fe9 (diff) |
remove all refs during removal, and protect from empty docs
Diffstat (limited to 'src/leap/mail/imap/messageparts.py')
-rw-r--r-- | src/leap/mail/imap/messageparts.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/leap/mail/imap/messageparts.py b/src/leap/mail/imap/messageparts.py index 6f1376a..257721c 100644 --- a/src/leap/mail/imap/messageparts.py +++ b/src/leap/mail/imap/messageparts.py @@ -287,7 +287,7 @@ class MessageWrapper(object): logger.debug("Error while walking message...") logger.exception(exc) - if not empty(self.fdoc.content): + if not empty(self.fdoc.content) and 'uid' in self.fdoc.content: yield self.fdoc if not empty(self.hdoc.content): yield self.hdoc @@ -418,10 +418,8 @@ class MessagePart(object): if payload: content_type = self._get_ctype_from_document(phash) charset = find_charset(content_type) - logger.debug("Got charset from header: %s" % (charset,)) if charset is None: charset = self._get_charset(payload) - logger.debug("Got charset: %s" % (charset,)) try: if isinstance(payload, unicode): payload = payload.encode(charset) |