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.
pull/8695/head
robert-hh 2022-05-19 21:09:41 +02:00 zatwierdzone przez Damien George
rodzic beeb250d58
commit dd35f76db3
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

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