Ignore bad encoding: keep it as is

This is to avoid bad signature due to missing/replaced char
This commit is contained in:
nemunaire 2022-02-19 16:13:38 +01:00
parent d1b358fcd1
commit 8cf6d5c785

View File

@ -193,7 +193,7 @@ def readmail(fp):
theEMail = fp.read()
try:
gpgmail = gnupg_mail.Message(theEMail.decode(), settings=gnupg_mail.Settings(log_level='debug',require_signed=True), gpg=gnupg.GPG(gnupghome=GNUPG_DIRECTORY))
gpgmail = gnupg_mail.Message(theEMail.decode('utf-8', errors='backslashreplace'), settings=gnupg_mail.Settings(require_signed=True), gpg=gnupg.GPG(gnupghome=GNUPG_DIRECTORY))
except:
gpgmail = None