diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/container.py | 4 | ||||
| -rwxr-xr-x | src/conf_mode/interfaces_ethernet.py | 2 | ||||
| -rw-r--r-- | src/conf_mode/vpp_interfaces_bonding.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 20ec300aa..19ff0da34 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -177,13 +177,13 @@ def verify(container): try: network = [x for x in container['network'][network_name]['prefix'] if is_ipv4(x)][0] cnt_ipv4 += 1 - except: + except Exception: raise ConfigError(f'Network "{network_name}" does not contain an IPv4 prefix!') elif is_ipv6(address): try: network = [x for x in container['network'][network_name]['prefix'] if is_ipv6(x)][0] cnt_ipv6 += 1 - except: + except Exception: raise ConfigError(f'Network "{network_name}" does not contain an IPv6 prefix!') # Specified container IP address must belong to network prefix diff --git a/src/conf_mode/interfaces_ethernet.py b/src/conf_mode/interfaces_ethernet.py index 2eb36a231..b9177cd34 100755 --- a/src/conf_mode/interfaces_ethernet.py +++ b/src/conf_mode/interfaces_ethernet.py @@ -159,7 +159,7 @@ def get_config(config=None): max_mtu = EthernetIf(ifname).get_max_mtu() if max_mtu < int(ethernet['mtu']): ethernet['mtu'] = str(max_mtu) - except: + except Exception: pass if 'is_bond_member' in ethernet: diff --git a/src/conf_mode/vpp_interfaces_bonding.py b/src/conf_mode/vpp_interfaces_bonding.py index 51272c087..d02975e23 100644 --- a/src/conf_mode/vpp_interfaces_bonding.py +++ b/src/conf_mode/vpp_interfaces_bonding.py @@ -188,7 +188,7 @@ def verify(config): mac = config['mac'] try: assert_mac(mac, test_all_zero=False) - except: + except Exception: raise ConfigError( f'Cannot use {mac}: it is a multicast MAC address. Please provide a unicast MAC address.' ) |
