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.
This commit is contained in:
Barry Warsaw 2007-08-30 02:10:49 +00:00
parent ce36ad8a46
commit 8b3d659692
4 changed files with 20 additions and 24 deletions

View file

@ -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')