7or8bit-decode #5

Manually merged
revsuine merged 17 commits from 7or8bit-decode into master 2024-11-14 19:45:52 +00:00
Showing only changes of commit 9a3a1f2cb7 - Show all commits

View file

@ -82,8 +82,8 @@ def decode_email(message: email.message.Message) -> email.message.Message:
for part in quopri_decoded_message.walk():
if not part.is_multipart():
if part.get("Content-Transfer-Encoding") == "base64":
b64_str = part.get_payload()
decoded_b64_str = part.get_payload(decode=True)
b64_str = part.get_payload().encode()
decoded_b64_str = part.get_payload(decode=True).encode()
decoded_bytes = decoded_bytes.replace(
b64_str,
decoded_b64_str