parseaddr_unicode: handle case where name is bytes
This commit is contained in:
parent
25118dff9b
commit
4b697fc897
|
@ -593,6 +593,8 @@ def parseaddr_unicode(addr) -> (str, str):
|
|||
else:
|
||||
name = decoded_string
|
||||
|
||||
if type(name) == bytes:
|
||||
name = name.decode()
|
||||
return name, email
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue