Correct reraising of exception

When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.

Change-Id: Ib9d568d1d2915d5f183c076a114312c7bd9d5dfc
This commit is contained in:
qinchunhua 2016-07-11 02:16:43 -04:00
parent d0967e9e34
commit b8283527be
1 changed files with 5 additions and 5 deletions

10
astara/test/functional/base.py Normal file → Executable file
View File

@ -445,7 +445,7 @@ class TestTenant(object):
if e.status_code == 404:
router_ids.remove(rid)
else:
raise e
raise
self._wait_for_neutron_delete('router', router_ids)
time.sleep(2)
@ -461,7 +461,7 @@ class TestTenant(object):
if e.status_code == 404:
port_ids.remove(pid)
else:
raise e
raise
self._wait_for_neutron_delete('port', port_ids)
subnet_ids = [
@ -475,7 +475,7 @@ class TestTenant(object):
if e.status_code == 404:
subnet_ids.remove(sid)
else:
raise e
raise
self._wait_for_neutron_delete('subnet', subnet_ids)
# need to make sure the vrrp and mgt ports get deleted
@ -487,7 +487,7 @@ class TestTenant(object):
if e.status_code == 404:
astara_router_ports.remove(p)
else:
raise e
raise
self._wait_for_neutron_delete('port', astara_router_ports)
networks = self.clients.neutronclient.list_networks().get('networks')
@ -501,7 +501,7 @@ class TestTenant(object):
if e.status_code == 404:
net_ids.remove(nid)
else:
raise e
raise
self._wait_for_neutron_delete('network', net_ids)