mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
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
|
||||
|
||||
|
||||
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]
|
||||
if charset is not None:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user