mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Do not try to decode empty string.
This commit is contained in:
@@ -130,6 +130,8 @@ class Email(object):
|
||||
if header in msg:
|
||||
decoded_values = []
|
||||
for value, encoding in email.header.decode_header(msg[header]):
|
||||
if not len(value):
|
||||
continue
|
||||
if encoding:
|
||||
value = smart_text(value, encoding=encoding)
|
||||
elif isinstance(value, six.binary_type):
|
||||
|
||||
Reference in New Issue
Block a user