summaryrefslogtreecommitdiff
path: root/script/qmauth.py
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-03-02 17:34:20 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2023-03-02 17:34:20 +0100
commit1b09b3a26141c22f37b6ab3ed9af15fcbddd18f8 (patch)
tree78661ebc3a01a2a5255e9d101793e6950a8b5160 /script/qmauth.py
parent3e51e5465c9db91494b972d28a96cdae428c12b7 (diff)
Bugfixes
1. correctly read mime parts 2. avoid encoding issues when parsing json form qmauth 3. use 'replace' instead of 'strict' error handling when decoding mails in qmauth.py
Diffstat (limited to 'script/qmauth.py')
-rwxr-xr-xscript/qmauth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/qmauth.py b/script/qmauth.py
index 7803483..052b8dd 100755
--- a/script/qmauth.py
+++ b/script/qmauth.py
@@ -202,7 +202,7 @@ def count_mails(f, subfolder):
def _get_body(mail):
if not mail.is_multipart():
if mail.get_content_maintype() == 'text':
- return mail.get_payload(decode=True).decode()
+ return mail.get_payload(decode=True).decode(errors='replace')
else:
return mail.get_payload()