Handle case where os_auth_token is set to ''

Properly handle case (as in CLI) where os_auth_token is
set, but to an empty string.

Change-Id: I7e96bf22e2a91e0e3ec783b406fd05e4138860c8
This commit is contained in:
Eoghan Glynn
2013-08-02 17:07:28 +01:00
parent 1772adf0cc
commit e4348aa3d2

View File

@@ -74,7 +74,7 @@ def get_client(api_version, **kwargs):
}
_ksclient = _get_ksclient(**ks_kwargs)
token = ((lambda: kwargs.get('os_auth_token'))
if 'os_auth_token' in kwargs
if kwargs.get('os_auth_token')
else (lambda: _ksclient.auth_token))
endpoint = kwargs.get('ceilometer_url') or \