catch system error and log as warning level instead of error level in case interface was already deleted Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
This commit is contained in:
parent
2b3b85bac8
commit
60f9602095
@ -45,7 +45,15 @@ class PortIndexMapper(object):
|
||||
index = port_util.get_index_from_str(ifname)
|
||||
if op == 'SET' and index is None:
|
||||
return
|
||||
|
||||
# catch system error and log as warning level instead of
|
||||
# error level in case interface was already deleted
|
||||
ifindex = None
|
||||
try:
|
||||
ifindex = if_nametoindex(ifname)
|
||||
except OSError as e:
|
||||
logger.log_warning("%s" % str(e))
|
||||
|
||||
if op == 'SET' and ifindex is None:
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user