diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-17 03:57:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-17 03:57:45 +0000 |
| commit | ff3af9f9d56ff42d565f8a93c09028d31a46f690 (patch) | |
| tree | a75de49986f4153d0c9426702c873e334d20a069 /openstackclient/identity | |
| parent | 7b32ec003babec2c6d052146baf2951e465454f5 (diff) | |
| parent | 7829aca70459753d7df0e197f4bf6090542f9b7b (diff) | |
| download | python-openstackclient-ff3af9f9d56ff42d565f8a93c09028d31a46f690.tar.gz | |
Merge "only return endpoints that have url"
Diffstat (limited to 'openstackclient/identity')
| -rw-r--r-- | openstackclient/identity/v2_0/catalog.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py index c10001d0..e166c855 100644 --- a/openstackclient/identity/v2_0/catalog.py +++ b/openstackclient/identity/v2_0/catalog.py @@ -30,8 +30,10 @@ def _format_endpoints(eps=None): for index, ep in enumerate(eps): region = eps[index].get('region', '<none>') ret += region + '\n' - for url in ['publicURL', 'internalURL', 'adminURL']: - ret += " %s: %s\n" % (url, eps[index][url]) + for endpoint_type in ['publicURL', 'internalURL', 'adminURL']: + url = eps[index].get(endpoint_type) + if url: + ret += " %s: %s\n" % (endpoint_type, url) return ret |
