Commit 083e20c8 authored by Guido van Rossum's avatar Guido van Rossum

Forgot one. This makes test_urllib2.py pass.

parent 022c4746
......@@ -50,7 +50,7 @@ def b64encode(s, altchars=None):
The encoded byte string is returned.
"""
if not isinstance(s, bytes):
s = bytes(s)
s = bytes(s, "ascii")
# Strip off the trailing newline
encoded = binascii.b2a_base64(s)[:-1]
if altchars is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment