Commit fa1e3f8f authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

format: allow tap to not have ipv4 address

fixup for a8917a3c
parent 4b4f65ae
Pipeline #20107 failed with stage
in 0 seconds
...@@ -897,9 +897,6 @@ class Tap(object): ...@@ -897,9 +897,6 @@ class Tap(object):
raise_on_error=False) raise_on_error=False)
if code != 0 or self.ipv4_addr not in result or self.name not in result: if code != 0 or self.ipv4_addr not in result or self.name not in result:
callAndRead(['ip', 'route', 'add', self.ipv4_addr, 'dev', self.name]) callAndRead(['ip', 'route', 'add', self.ipv4_addr, 'dev', self.name])
else:
raise ValueError("%s should not be empty. No ipv4 address assigned to %s" %
(self.ipv4_addr, self.name))
if self.ipv6_network: if self.ipv6_network:
# Check if this route exits # Check if this route exits
......
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