Commit f3253311 authored by Jason R. Coombs's avatar Jason R. Coombs

Use preferred interface, fixing DeprecationWarning on later Pythons.

parent b3d098a3
......@@ -980,8 +980,7 @@ def _encode_auth(auth):
auth_s = urllib.parse.unquote(auth)
# convert to bytes
auth_bytes = auth_s.encode()
# use the legacy interface for Python 2.3 support
encoded_bytes = base64.encodestring(auth_bytes)
encoded_bytes = base64.b64encode(auth_bytes)
# convert back to a string
encoded = encoded_bytes.decode()
# strip the trailing carriage return
......
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