1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

use "except Exception:" instead of "except:"

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2020-06-24 01:12:24 +02:00
parent efa80e3043
commit 3218f49d81
36 changed files with 178 additions and 178 deletions

View File

@@ -406,7 +406,7 @@ class address(Addon, moduleBase):
if old_hwaddress and utils.mac_str_to_int(old_hwaddress) != utils.mac_str_to_int(hwaddress):
self.iproute2.bridge_fdb_del(bridgename, old_hwaddress, vlan)
break
except:
except Exception:
pass
self.iproute2.bridge_fdb_add(bridgename, hwaddress, vlan)
else:
@@ -973,7 +973,7 @@ class address(Addon, moduleBase):
dhclientcmd.release6(ifaceobj.name)
self.cache.force_address_flush_family(ifaceobj.name, socket.AF_INET6)
force_reapply = True
except:
except Exception:
pass
self.process_mtu(ifaceobj, ifaceobj_getfunc)
@@ -1224,7 +1224,7 @@ class address(Addon, moduleBase):
if clagd_vxlan_anycast_ip in intf_running_addrs:
user_config_addrs.append(clagd_vxlan_anycast_ip)
except:
except Exception:
pass
# Set ifaceobjcurr method and family
@@ -1240,7 +1240,7 @@ class address(Addon, moduleBase):
ifaceobjcurr.update_config_with_status('address', str(address), address not in intf_running_addrs)
try:
intf_running_addrs.remove(address)
except:
except Exception:
pass
# if any ip address is left in 'intf_running_addrs' it means that they
@@ -1283,7 +1283,7 @@ class address(Addon, moduleBase):
for default_addr in self.default_loopback_addresses:
try:
intf_running_addrs.remove(default_addr)
except:
except Exception:
pass
ifaceobjrunning.addr_family.append('inet')
ifaceobjrunning.addr_method = 'loopback'