diff options
| author | Barry Warsaw | 2009-02-09 22:19:18 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-02-09 22:19:18 -0500 |
| commit | 98c52ea14883f0261fd7a2f2fe8db42d96331ddb (patch) | |
| tree | a0c5817f4c226ed14b3fe510314e825980b6cb4e /src/mailman/Utils.py | |
| parent | 84a81e4a90349f7116863d2f45cda1ee31b5b3b5 (diff) | |
| download | mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.tar.gz mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.tar.zst mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.zip | |
Diffstat (limited to 'src/mailman/Utils.py')
| -rw-r--r-- | src/mailman/Utils.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mailman/Utils.py b/src/mailman/Utils.py index 9946273c9..b6715616c 100644 --- a/src/mailman/Utils.py +++ b/src/mailman/Utils.py @@ -22,6 +22,13 @@ message and address munging, a handy-dandy routine to map a function on all the mailing lists, and whatever else doesn't belong elsewhere. """ +from __future__ import absolute_import, unicode_literals + +__metaclass__ = type +__all__ = [ + ] + + import os import re import cgi @@ -31,10 +38,9 @@ import base64 import random import logging import htmlentitydefs -import email.Header -import email.Iterators -from email.Errors import HeaderParseError +from email.errors import HeaderParseError +from email.header import decode_header, make_header from lazr.config import as_boolean from string import ascii_letters, digits, whitespace @@ -609,7 +615,7 @@ def uquote(s): def oneline(s, cset='us-ascii', in_unicode=False): # Decode header string in one line and convert into specified charset try: - h = email.Header.make_header(email.Header.decode_header(s)) + h = make_header(decode_header(s)) ustr = h.__unicode__() line = UEMPTYSTRING.join(ustr.splitlines()) if in_unicode: |
