]> git.phdru.name Git - mimedecode.git/commitdiff
Import email.header for Python 3 compatibility
authorOleg Broytman <phd@phdru.name>
Thu, 28 Jul 2016 22:13:39 +0000 (01:13 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 28 Jul 2016 22:13:39 +0000 (01:13 +0300)
mimedecode.py

index 839703fbc6d6b85d13145f2afc192b3145cbd454..ce4b288627ca1b565b0134614f9b97cfcf6349de 100755 (executable)
@@ -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