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

sonar: lib: nlcache: catch exception only once

Catch this exception only once;
it is already handled by a previous except clause

Ticket: #3035926

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2022-04-26 12:03:01 +02:00
parent dee2c49d58
commit 10ddf286f3

View File

@ -593,7 +593,7 @@ class _NetlinkCache:
except (KeyError, TypeError):
# ifname is not present in the cache
return False
except TypeError as e:
except Exception as e:
return self.__handle_type_error(inspect.currentframe().f_code.co_name, ifname, str(e), return_value=False)
def link_is_loopback(self, ifname):