mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Fix authentication with Python 3 (Issue #153)
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ class Requester:
|
||||
if password is not None:
|
||||
login = login_or_token
|
||||
if atLeastPython3:
|
||||
self.__authorizationHeader = "Basic " + str(base64.b64encode(bytearray(login + ":" + password, "utf-8"))).replace('\n', '') # pragma no cover
|
||||
self.__authorizationHeader = "Basic " + base64.b64encode((login + ":" + password).encode("utf-8")).decode("utf-8").replace('\n', '') # pragma no cover
|
||||
else:
|
||||
self.__authorizationHeader = "Basic " + base64.b64encode(login + ":" + password).replace('\n', '')
|
||||
elif login_or_token is not None:
|
||||
|
||||
Reference in New Issue
Block a user