kopia lustrzana https://github.com/micropython/micropython
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
rodzic
beeb250d58
commit
dd35f76db3
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue