summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2015-03-06 11:27:54 -0600
committerDean Troyer <dtroyer@gmail.com>2015-03-06 11:28:11 -0600
commitee2ba48aa4d32e12a18e2722492e99fca5dd03e5 (patch)
tree7ee06a0b60f9478cb1b4b9c7181ca5aa682db772 /openstackclient
parentd05b5e14f13244e269c2bbaa9db6395e37af2b8a (diff)
downloadpython-openstackclient-ee2ba48aa4d32e12a18e2722492e99fca5dd03e5.tar.gz
Fix catalog list when region name is absent
Some service catalogs in the wild have services without region names defined. Let's be nice and stuff in a default value indicating this state. Closes-Bug: #1429211 Change-Id: I3ebe2534dc6e3438aaeddc7757fb2db4117eae4b
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/v2_0/catalog.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/identity/v2_0/catalog.py b/openstackclient/identity/v2_0/catalog.py
index 363d5ab2..7d17fbf5 100644
--- a/openstackclient/identity/v2_0/catalog.py
+++ b/openstackclient/identity/v2_0/catalog.py
@@ -28,7 +28,8 @@ def _format_endpoints(eps=None):
return ""
ret = ''
for index, ep in enumerate(eps):
- ret += eps[index]['region'] + '\n'
+ region = eps[index].get('region', '<none>')
+ ret += region + '\n'
for url in ['publicURL', 'internalURL', 'adminURL']:
ret += " %s: %s\n" % (url, eps[index]['publicURL'])
return ret