tests/run-multitests.py: Use LAN for IP address if WLAN doesn't exist.

This allows running the test on boards with just a LAN interface.

Fixes issue #8681.
This commit is contained in:
robert-hh
2022-05-19 21:09:41 +02:00
committed by Damien George
parent beeb250d58
commit dd35f76db3

View File

@@ -64,7 +64,10 @@ class multitest:
def get_network_ip(): def get_network_ip():
try: try:
import network import network
ip = network.WLAN().ifconfig()[0] if hasattr(network, "WLAN"):
ip = network.WLAN().ifconfig()[0]
else:
ip = network.LAN().ifconfig()[0]
except: except:
ip = HOST_IP ip = HOST_IP
return ip return ip