Commit 0941e532 authored by Łukasz Nowak's avatar Łukasz Nowak

format: Allow to log when tap has no name attribute

In some conditions there is no name attribute on tap, so allow real fallback
to interface name.
parent 8d5de1d0
Pipeline #34897 passed with stage
in 0 seconds
......@@ -1320,7 +1320,7 @@ class Interface(object):
# same network, try to add
if self._addSystemAddress(addr, netmask, tap=tap):
# succeed, return it
self._logger.info('Successfully added IPv6 %s to %s.' % (addr, tap.name or interface_name))
self._logger.info('Successfully added IPv6 %s to %s.' % (addr, getattr(tap, 'name', None) or interface_name))
return dict_addr_netmask
else:
self._logger.warning('Impossible to add old public IPv6 %s. '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment