Merge "Fix catalog list when region name is absent"

This commit is contained in:
Jenkins 2015-03-08 17:59:16 +00:00 committed by Gerrit Code Review
commit 8f7e0ef35e

View File

@ -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