From 7311b15f601a7aedae96f545f752b208153bb73f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 17 Feb 2020 20:48:13 +0100 Subject: ethernet: automatically detect available interfaces --- scripts/cli/test_interfaces_ethernet.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cli/test_interfaces_ethernet.py b/scripts/cli/test_interfaces_ethernet.py index 330db08e0..f8eac6ec3 100755 --- a/scripts/cli/test_interfaces_ethernet.py +++ b/scripts/cli/test_interfaces_ethernet.py @@ -25,11 +25,11 @@ class EthernetInterfaceTest(BasicInterfaceTest.BaseTest): self._test_mtu = True self._interfaces = [] - # auto detect all ethernet interfaces - for interface in list_interfaces_of_type("ethernet"): - if '.' not in interface: - self._interfaces.append(interface) - + # we need to filter out VLAN interfaces identified by a dot (.) + # in their name - just in case! + for tmp in list_interfaces_of_type("ethernet"): + if not '.' in tmp: + self._interfaces.append(tmp) if __name__ == '__main__': -- cgit v1.2.3