auth: fix header type

You know that HTTP wants byte but keystoneauth wants strings.

Change-Id: Ie498275c9389d27313244ef15bdfc8b2a71e088c
This commit is contained in:
Julien Danjou 2017-01-13 11:02:30 +01:00
parent ed7c1acab9
commit 069108306f
1 changed files with 4 additions and 2 deletions

View File

@ -90,8 +90,10 @@ class GnocchiBasicPlugin(plugin.BaseAuthPlugin):
self._endpoint = endpoint
def get_headers(self, session, **kwargs):
return {'Authorization':
b"basic " + base64.b64encode(self._user + b":")}
return {
'Authorization':
b"basic " + base64.b64encode(self._user + b":").decode('ascii')
}
def get_endpoint(self, session, **kwargs):
return self._endpoint