kopia lustrzana https://github.com/micropython/micropython
tests/run-multitests.py: Read IP address from boot nic if available.
This works if your network is pre-configured in boot.py as an object called "nic". Without this, multitests expects to access the WLAN/LAN class which isn't always correct. Signed-off-by: Andrew Leech <andrew@alelec.net>pull/8724/head
rodzic
73a1ea8812
commit
b7a39ad2d1
|
@ -62,6 +62,9 @@ class multitest:
|
||||||
multitest.flush()
|
multitest.flush()
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_network_ip():
|
def get_network_ip():
|
||||||
|
try:
|
||||||
|
ip = nic.ifconfig()[0]
|
||||||
|
except:
|
||||||
try:
|
try:
|
||||||
import network
|
import network
|
||||||
if hasattr(network, "WLAN"):
|
if hasattr(network, "WLAN"):
|
||||||
|
|
Ładowanie…
Reference in New Issue