diff options
author | Barry Warsaw <barry@python.org> | 2007-08-30 02:10:49 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2007-08-30 02:10:49 (GMT) |
commit | 8b3d659692b6d092991dc3b5b4042547f885fa8c (patch) | |
tree | 49fc0c7a89c31479389f2dfb38d71f519ba4cb23 /Lib/email/quoprimime.py | |
parent | ce36ad8a467d914eb5c91f33835b9eaea18ee93b (diff) | |
download | cpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.zip cpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.tar.gz cpython-8b3d659692b6d092991dc3b5b4042547f885fa8c.tar.bz2 |
Fix a more bytes/str confusion.
Use str.encode('raw-unicode-escape') consistently instead of bytes(string).
Remove the convert_eols argument from base64mime.decode(). This matches
previous API changes done to the quoprimime module.
Diffstat (limited to 'Lib/email/quoprimime.py')
-rw-r--r-- | Lib/email/quoprimime.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py index ce624d9..dfd3ccb 100644 --- a/Lib/email/quoprimime.py +++ b/Lib/email/quoprimime.py @@ -55,7 +55,10 @@ EMPTYSTRING = '' # See also Charset.py MISC_LEN = 7 -HEADER_SAFE_BYTES = b'-!*+/ ' + bytes(ascii_letters) + bytes(digits) +HEADER_SAFE_BYTES = (b'-!*+/ ' + + ascii_letters.encode('raw-unicode-escape') + + digits.encode('raw-unicode-escape')) + BODY_SAFE_BYTES = (b' !"#$%&\'()*+,-./0123456789:;<>' b'?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`' b'abcdefghijklmnopqrstuvwxyz{|}~\t') |