Skip to content

Commit 6467dcf

Browse files
committed
fix(udp_server): Fix logs
1 parent 526317d commit 6467dcf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/WiFi/examples/WiFiUDPClient/udp_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def get_interface_ips():
4242
if ip not in interface_ips and ip != '127.0.0.1':
4343
interface_ips.append(ip)
4444
except (subprocess.TimeoutExpired, subprocess.SubprocessError, FileNotFoundError):
45-
pass
45+
print("Error: Failed to get interface IPs using system commands")
46+
print("Trying fallback methods...")
4647

4748
# Fallback: try to get IPs using socket methods
4849
if not interface_ips:
@@ -54,7 +55,7 @@ def get_interface_ips():
5455
if ip not in interface_ips and ip != '127.0.0.1':
5556
interface_ips.append(ip)
5657
except socket.gaierror:
57-
pass
58+
print("Error: Failed to get interface IPs using sockets")
5859

5960
# Fail if no interfaces found
6061
if not interface_ips:

0 commit comments

Comments
 (0)