handle header is None in get_header_unicode
This commit is contained in:
parent
00fde00d53
commit
5f0930b291
|
@ -613,7 +613,10 @@ def get_spam_from_header(spam_status_header, max_score=None) -> (bool, str):
|
||||||
return spamassassin_answer.lower() == "yes", spam_status_header
|
return spamassassin_answer.lower() == "yes", spam_status_header
|
||||||
|
|
||||||
|
|
||||||
def get_header_unicode(header: str):
|
def get_header_unicode(header: str) -> str:
|
||||||
|
if header is None:
|
||||||
|
return ""
|
||||||
|
|
||||||
decoded_string, charset = decode_header(header)[0]
|
decoded_string, charset = decode_header(header)[0]
|
||||||
if charset is not None:
|
if charset is not None:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue