From: Oleg Broytman Date: Thu, 28 Jul 2016 22:13:39 +0000 (+0300) Subject: Import email.header for Python 3 compatibility X-Git-Tag: 2.7.0~36 X-Git-Url: https://git.phdru.name/mimedecode.git/?a=commitdiff_plain;h=e6aea39b9faf08f3c8edc95d4367f8f828346852;p=mimedecode.git Import email.header for Python 3 compatibility --- 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