From e6aea39b9faf08f3c8edc95d4367f8f828346852 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 29 Jul 2016 01:13:39 +0300 Subject: [PATCH] Import email.header for Python 3 compatibility --- mimedecode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mimedecode.py b/mimedecode.py index 839703f..ce4b288 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -43,9 +43,9 @@ def _decode_header(s): """Return a decoded string according to RFC 2047. NOTE: This is almost the same as email.Utils.decode. """ - import email.Header + import email.header - L = email.Header.decode_header(s) + L = email.header.decode_header(s) if not isinstance(L, list): # s wasn't decoded return s -- 2.39.2