diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 71f284fd18..9266441944 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -475,8 +475,10 @@ def flush_fou_ports(): def flush_l2tp_tunnels(): tids = [] - output = check_output('ip l2tp show tunnel') - for line in output.splitlines(): + ret = run('ip l2tp show tunnel') + if ret.returncode != 0: + return # l2tp may not be supported + for line in ret.stdout.splitlines(): words = line.split() if words[0] == 'Tunnel': tid = words[1].rstrip(',')