mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Update helpdesk/management/commands/get_email.py
ignore when some characters can't be decoded to avoid unicode decode error.
This commit is contained in:
parent
30a577e18b
commit
43658abad9
@ -135,9 +135,9 @@ def process_queue(q, quiet=False):
|
||||
def decodeUnknown(charset, string):
|
||||
if not charset:
|
||||
try:
|
||||
return string.decode('utf-8')
|
||||
return string.decode('utf-8','ignore')
|
||||
except:
|
||||
return string.decode('iso8859-1')
|
||||
return string.decode('iso8859-1','ignore')
|
||||
return unicode(string, charset)
|
||||
|
||||
def decode_mail_headers(string):
|
||||
|
Loading…
Reference in New Issue
Block a user