commit bc43c45f603616db5cf61d507f87d40fbddb9200
parent 41133f1f55a73f00233bc082a5997877aa67e168
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sat, 23 Nov 2019 15:24:43 +0100
oops
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/get_email_header b/get_email_header
@@ -13,7 +13,7 @@ try:
subj = ''.join([
frag.decode(enc if enc else "utf-8")
if isinstance(frag, bytes) else frag
- for frag, enc in decode_header(message['subject'])])
+ for frag, enc in decode_header(message[header])])
except (HeaderParseError, UnicodeDecodeError): # maybe warn about error?
subj = message['subject']
subj = subj.decode("utf-8") if isinstance(subj, bytes) else subj