Skip to content

Commit ee2ba48

Browse files
author
Dean Troyer
committed
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
1 parent d05b5e1 commit ee2ba48

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎openstackclient/identity/v2_0/catalog.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def _format_endpoints(eps=None):
2828
return ""
2929
ret = ''
3030
for index, ep in enumerate(eps):
31-
ret += eps[index]['region'] + '\n'
31+
region = eps[index].get('region', '<none>')
32+
ret += region + '\n'
3233
for url in ['publicURL', 'internalURL', 'adminURL']:
3334
ret += " %s: %s\n" % (url, eps[index]['publicURL'])
3435
return ret

0 commit comments

Comments
 (0)