diff --git a/cinderclient/client.py b/cinderclient/client.py index a436841cc..b4ebdb6a9 100644 --- a/cinderclient/client.py +++ b/cinderclient/client.py @@ -159,7 +159,7 @@ class HTTPClient(object): if not auth_url: raise exceptions.EndpointNotFound() - self.auth_url = auth_url.rstrip('/') + self.auth_url = auth_url.rstrip('/') if auth_url else None self.version = 'v1' self.region_name = region_name self.endpoint_type = endpoint_type diff --git a/cinderclient/tests/test_http.py b/cinderclient/tests/test_http.py index f0121ea94..e362dd366 100644 --- a/cinderclient/tests/test_http.py +++ b/cinderclient/tests/test_http.py @@ -198,6 +198,10 @@ class ClientTest(utils.TestCase): test_get_call() self.assertEqual([], self.requests) + def test_get_no_auth_url(self): + client.HTTPClient("username", "password", + "project_id", retries=0) + def test_post(self): cl = get_authed_client()