From 8cf6d5c7857f5103e5881a5ad6b931489c8647f0 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 19 Feb 2022 16:13:38 +0100 Subject: [PATCH] Ignore bad encoding: keep it as is This is to avoid bad signature due to missing/replaced char --- check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.py b/check.py index b78b8eb..7c497cc 100755 --- a/check.py +++ b/check.py @@ -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