Update receive.py
This commit is contained in:
parent
b8803a51ad
commit
4c7cbd6d7a
1 changed files with 1 additions and 4 deletions
|
|
@ -481,10 +481,7 @@ class Email:
|
|||
"""Detect chartset."""
|
||||
charset = part.get_content_charset()
|
||||
if not charset:
|
||||
if six.PY2:
|
||||
charset = chardet.detect(str(part))['encoding']
|
||||
else:
|
||||
charset = chardet.detect(frappe.safe_encode(str(part)))['encoding']
|
||||
charset = chardet.detect(frappe.safe_encode(str(part)))['encoding']
|
||||
|
||||
return charset
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue