mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01:00
ignore UnicodeDecodeError when parsing SpamAssassin response
This commit is contained in:
parent
c8e92af4d3
commit
8ed619687f
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ class SpamAssassin(object):
|
||||||
logging.error(first_line)
|
logging.error(first_line)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
report_list = [s.strip() for s in body.decode("utf-8").strip().split("\n")]
|
report_list = [
|
||||||
|
s.strip() for s in body.decode("utf-8", errors="ignore").strip().split("\n")
|
||||||
|
]
|
||||||
linebreak_num = report_list.index([s for s in report_list if "---" in s][0])
|
linebreak_num = report_list.index([s for s in report_list if "---" in s][0])
|
||||||
tablelists = [s for s in report_list[linebreak_num + 1 :]]
|
tablelists = [s for s in report_list[linebreak_num + 1 :]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue