Remove superfluous except/re-raise
This exception code catches all exceptions, and then always raises them again. More interestingly, it uses excutils.save_and_reraise_exception incorrectly (outside a `with` statement), which triggers the pylint test designed to catch exactly this. Change-Id: Iab9d69944cbae5257682ac65ff2b8fba3ef7017e
This commit is contained in:
parent
0c1223862c
commit
1f138e25d3
@ -101,15 +101,13 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
|
|||||||
""" delete a vrf on NOS device."""
|
""" delete a vrf on NOS device."""
|
||||||
router = super(BrocadeSVIPlugin, self).get_router(context, router_id)
|
router = super(BrocadeSVIPlugin, self).get_router(context, router_id)
|
||||||
super(BrocadeSVIPlugin, self).delete_router(context, router_id)
|
super(BrocadeSVIPlugin, self).delete_router(context, router_id)
|
||||||
try:
|
|
||||||
switch = self._switch
|
switch = self._switch
|
||||||
self._driver.delete_router(switch['address'],
|
self._driver.delete_router(switch['address'],
|
||||||
switch['username'],
|
switch['username'],
|
||||||
switch['password'],
|
switch['password'],
|
||||||
switch['rbridge_id'],
|
switch['rbridge_id'],
|
||||||
str(router['id']))
|
str(router['id']))
|
||||||
except Exception:
|
|
||||||
excutils.save_and_reraise_exception()
|
|
||||||
|
|
||||||
def add_router_interface(self, context, router_id, interface_info):
|
def add_router_interface(self, context, router_id, interface_info):
|
||||||
"""creates svi on NOS device and assigns ip addres to SVI."""
|
"""creates svi on NOS device and assigns ip addres to SVI."""
|
||||||
|
Loading…
Reference in New Issue
Block a user