mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
Use encodebytes instead of encodestring (deprecated since Py 3.1)
This commit is contained in:
committed by
Marcin Kulik
parent
f3fecec1b8
commit
52a33b764b
@@ -67,7 +67,7 @@ class URLLibHttpAdapter:
|
|||||||
|
|
||||||
if password:
|
if password:
|
||||||
auth = "%s:%s" % (username, password)
|
auth = "%s:%s" % (username, password)
|
||||||
encoded_auth = base64.encodestring(auth.encode('utf-8'))[:-1]
|
encoded_auth = base64.encodebytes(auth.encode('utf-8'))[:-1]
|
||||||
headers["Authorization"] = b"Basic " + encoded_auth
|
headers["Authorization"] = b"Basic " + encoded_auth
|
||||||
|
|
||||||
request = Request(url, data=body, headers=headers, method="POST")
|
request = Request(url, data=body, headers=headers, method="POST")
|
||||||
|
|||||||
Reference in New Issue
Block a user