Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 95331b0

Browse files
updated gui.py
1 parent d25d6fd commit 95331b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

raspberry-pi/gui.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ def get_ip():
3636
# doesn't even have to be reachable
3737
pi_socket.connect(("10.255.255.255", 1))
3838
ip_address = pi_socket.getsockname()[0]
39+
ip_address = ip_address
3940
except socket.error:
4041
ip_address = "Not Connected"
4142
finally:
4243
pi_socket.close()
43-
ip_address = "Local Internet: " + ip_address
44+
ip_address = "Network Address: " + ip_address
4445
return ip_address
4546

4647

@@ -52,9 +53,10 @@ def get_internet_status():
5253
"""
5354
response = os.system("ping -c 1 -w2 " + "8.8.8.8" + " > /dev/null 2>&1")
5455
if response == 0:
55-
internet_connection = "Public Internet: Connected"
56+
internet_connection = "Yes"
5657
else:
57-
internet_connection = "Public Internet: Disconnected"
58+
internet_connection = "No"
59+
internet_connection = "Internet Access: " + internet_connection
5860
return internet_connection
5961

6062

0 commit comments

Comments
 (0)