Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 083e20c

Browse files
committed
Forgot one. This makes test_urllib2.py pass.
1 parent 022c474 commit 083e20c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/base64.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def b64encode(s, altchars=None):
5050
The encoded byte string is returned.
5151
"""
5252
if not isinstance(s, bytes):
53-
s = bytes(s)
53+
s = bytes(s, "ascii")
5454
# Strip off the trailing newline
5555
encoded = binascii.b2a_base64(s)[:-1]
5656
if altchars is not None:

0 commit comments

Comments
 (0)