Ignore bad encoding: keep it as is
This is to avoid bad signature due to missing/replaced char
This commit is contained in:
parent
d1b358fcd1
commit
8cf6d5c785
2
check.py
2
check.py
@ -193,7 +193,7 @@ def readmail(fp):
|
|||||||
|
|
||||||
theEMail = fp.read()
|
theEMail = fp.read()
|
||||||
try:
|
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:
|
except:
|
||||||
gpgmail = None
|
gpgmail = None
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user