don't flush IPv6 address if interface is absent
This commit is contained in:
parent
19300c7564
commit
6be1e19d98
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ class LinuxNetClient:
|
|||
:param str device: device to flush
|
||||
:return: nothing
|
||||
"""
|
||||
self.run(f"{IP_BIN} -6 address flush dev {device}")
|
||||
self.run(f"[ -e /sys/class/net/{device} ] && {IP_BIN} -6 address flush dev {device} || echo")
|
||||
|
||||
def device_mac(self, device, mac):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue