Small fixes => tests pass after 2to3

This commit is contained in:
Vincent Jacques
2012-11-21 20:30:35 +01:00
parent 9a03610f7b
commit d8e50c7937
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ class Requester:
def __init__(self, login_or_token, password, base_url, timeout, client_id, client_secret, user_agent):
if password is not None:
login = login_or_token
self.__authorizationHeader = "Basic " + base64.b64encode(login + ":" + password).replace('\n', '')
self.__authorizationHeader = "Basic " + str(base64.b64encode(bytearray(login + ":" + password, "utf-8"))).replace('\n', '')
elif login_or_token is not None:
token = login_or_token
self.__authorizationHeader = "token " + token