Merge "Fix for python3"

This commit is contained in:
Zuul 2018-02-11 22:00:45 +00:00 committed by Gerrit Code Review
commit b93dcc797f
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 uname = auth_provider.credentials.username
pwd = auth_provider.credentials.password pwd = auth_provider.credentials.password
auth = '{0}:{1}'.format(uname, pwd)
encoded_auth = base64.b64encode('{0}:{1}'.format(uname, pwd)) encoded_auth = base64.b64encode(auth.encode('utf-8'))
headers = {"Authorization": "Basic " + encoded_auth, headers = {"Authorization": "Basic " + encoded_auth.decode('utf-8'),
'content-type': 'application/json'} 'content-type': 'application/json'}
return headers return headers