Merge "Fix AttributeError in keystone functional tests"

This commit is contained in:
Jenkins
2015-06-25 17:04:48 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -65,7 +65,8 @@ class TestEndpoints(base.TestCase):
def _cleanup_services(self):
exception_list = list()
for s in self.operator_cloud.list_services():
if s['name'].startswith(self.new_item_name):
if s['name'] is not None and \
s['name'].startswith(self.new_item_name):
try:
self.operator_cloud.delete_service(name_or_id=s['id'])
except Exception as e:

View File

@@ -47,7 +47,8 @@ class TestServices(base.TestCase):
def _cleanup_services(self):
exception_list = list()
for s in self.operator_cloud.list_services():
if s['name'].startswith(self.new_service_name):
if s['name'] is not None and \
s['name'].startswith(self.new_service_name):
try:
self.operator_cloud.delete_service(name_or_id=s['id'])
except Exception as e: