summaryrefslogtreecommitdiff
path: root/keystoneclient/httpclient.py
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2014-06-17 19:17:10 -0400
committerJamie Lennox <jamielennox@redhat.com>2014-10-24 10:53:23 +0200
commit36ab799cb915b2b2fe697927274fde43c3a3c701 (patch)
tree6a0091b031d7aae57b40d58da2ca7eec8011880d /keystoneclient/httpclient.py
parent6d85d182a2cbd50f0e6a8477c97a84e149addbce (diff)
downloadpython-keystoneclient-36ab799cb915b2b2fe697927274fde43c3a3c701.tar.gz
Prevent AttributeError if no authorization
If you ask client if there is a service catalog when it is unauthorized it tries to look up the service catalog on a None object. If the client is unauthorized it should always return False as there cannot be a service catalog. Change-Id: I439f71e548b8230e7ce38d1a0e9d0d8f9b205d77 Closes-Bug: 1239219
Diffstat (limited to 'keystoneclient/httpclient.py')
-rw-r--r--keystoneclient/httpclient.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py
index d69bac3..ae949a3 100644
--- a/keystoneclient/httpclient.py
+++ b/keystoneclient/httpclient.py
@@ -312,7 +312,7 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin):
def has_service_catalog(self):
"""Returns True if this client provides a service catalog."""
- return self.auth_ref.has_service_catalog()
+ return self.auth_ref and self.auth_ref.has_service_catalog()
@property
def tenant_id(self):