mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 15:42:10 +03:00
Update message.py
use `email.message_from_bytes()` instead of decoding the bytes to then call `message_from_string`
This commit is contained in:
committed by
holger krekel
parent
5f1e5ef206
commit
369bb9166e
@@ -162,7 +162,7 @@ class Message(object):
|
||||
if mime_headers:
|
||||
s = ffi.string(ffi.gc(mime_headers, lib.dc_str_unref))
|
||||
if isinstance(s, bytes):
|
||||
s = s.decode("ascii")
|
||||
return email.message_from_bytes(s)
|
||||
return email.message_from_string(s)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user