diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-09-01 20:19:42 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-09-01 20:19:42 -0300 |
commit | 5bb258cbfdda64dcaa2cdd4c907ae6def4e37e66 (patch) | |
tree | 1b1b9ba1948365ab66e0e9ab106628c6d68a321c /service/pixelated | |
parent | fd1565e3dc63f3a327037695775fc07b5678d6da (diff) |
[bug] do not encode None as str
Issue #448
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/mailstore/leap_mailstore.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/pixelated/adapter/mailstore/leap_mailstore.py index b72c8804..a3a5e984 100644 --- a/service/pixelated/adapter/mailstore/leap_mailstore.py +++ b/service/pixelated/adapter/mailstore/leap_mailstore.py @@ -93,7 +93,7 @@ class LeapMail(Mail): def _decoded_header_utf_8(self, header_value): if isinstance(header_value, list): return self.remove_duplicates([self._decoded_header_utf_8(v) for v in header_value]) - else: + elif header_value is not None: content, encoding = decode_header(header_value)[0] if encoding: return unicode(content, encoding=encoding) |