Fix for python3

Change-Id: I81b676e0f3489f1c6dcd05918f4bd9b2ca034823
This commit is contained in:
Rocky 2018-02-09 11:07:27 +11:00
parent 04d53edd7f
commit 933ec08a96
1 changed files with 3 additions and 2 deletions

View File

@ -46,9 +46,10 @@ class ServiceBrokerClient(rest_client.RestClient):
"""
uname = auth_provider.credentials.username
pwd = auth_provider.credentials.password
auth = '{0}:{1}'.format(uname, pwd)
encoded_auth = base64.b64encode('{0}:{1}'.format(uname, pwd))
headers = {"Authorization": "Basic " + encoded_auth,
encoded_auth = base64.b64encode(auth.encode('utf-8'))
headers = {"Authorization": "Basic " + encoded_auth.decode('utf-8'),
'content-type': 'application/json'}
return headers