Merge pull request #127 from rconradharris/issue126

Don't filter endpoints when filter_value is non-truthy.
This commit is contained in:
Sandy Walsh 2011-10-07 13:30:41 -07:00
commit 16b083ddca

View File

@ -40,7 +40,7 @@ class ServiceCatalog(object):
endpoints = service['endpoints']
for endpoint in endpoints:
if filter_value == None or endpoint[attr] == filter_value:
if not filter_value or endpoint[attr] == filter_value:
return endpoint['publicURL']
raise novaclient.exceptions.EndpointNotFound()