diff options
author | Mayuri Ganguly <mayuri.ganguly@hp.com> | 2015-03-05 10:31:51 -0800 |
---|---|---|
committer | Mayuri Ganguly <mayuri.ganguly@hp.com> | 2015-03-05 10:53:52 -0800 |
commit | 9f1466372ef0838aa2871ebc11e9b801dd72982d (patch) | |
tree | 967631841dd94f226c8ceef6aee044b908c4d4a9 /troveclient/client.py | |
parent | ebcc41d179969467eb1cca3b679842bd3fef96a8 (diff) | |
download | python-troveclient-9f1466372ef0838aa2871ebc11e9b801dd72982d.tar.gz |
Fixed issues while using --bypass-url
Python-troveclient 1.0.8 introduced a regression where the usage
of --bypass-url results in an AuthSystemNotFound exception.
Removing some redundant code, which was due to a previous merge
conflict, fixed the issue.
Closes-bug 1416120
Change-Id: I1c949f69ee08447ce88aeefa92c60f361ab54832
Diffstat (limited to 'troveclient/client.py')
-rw-r--r-- | troveclient/client.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/troveclient/client.py b/troveclient/client.py index daa0173..e5164bd 100644 --- a/troveclient/client.py +++ b/troveclient/client.py @@ -79,7 +79,7 @@ class HTTPClient(TroveClientMixin): http_log_debug=False, cacert=None, bypass_url=None, auth_system='keystone', auth_plugin=None): - if auth_system != 'keystone' and not auth_plugin: + if auth_system and auth_system != 'keystone' and not auth_plugin: raise exceptions.AuthSystemNotFound(auth_system) if not auth_url and auth_system and auth_system != 'keystone': @@ -92,14 +92,6 @@ class HTTPClient(TroveClientMixin): self.projectid = projectid self.tenant_id = tenant_id - if auth_system and auth_system != 'keystone' and not auth_plugin: - raise exceptions.AuthSystemNotFound(auth_system) - - if not auth_url and auth_system and auth_system != 'keystone': - auth_url = auth_plugin.get_auth_url() - if not auth_url: - raise exceptions.EndpointNotFound() - self.auth_url = auth_url.rstrip('/') if auth_url else auth_url self.version = 'v1' self.region_name = region_name |