Do not try to decode empty string.

This commit is contained in:
Antoine Nguyen
2018-10-12 22:30:22 +02:00
parent 424be3428b
commit 69a5a2c243
+2
View File
@@ -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):