Spaces:
Running
Running
pragnakalp
commited on
Commit
•
abb6ec0
1
Parent(s):
35ee8bc
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,6 @@ def get_device_ip_address():
|
|
54 |
result = "Running on Windows"
|
55 |
hostname = socket.gethostname()
|
56 |
ip_address = socket.gethostbyname(hostname)
|
57 |
-
print(result)
|
58 |
return ip_address
|
59 |
elif os.name == "posix":
|
60 |
gw = os.popen("ip -4 route show default").read().split()
|
@@ -63,7 +62,6 @@ def get_device_ip_address():
|
|
63 |
ip_address = s.getsockname()[0]
|
64 |
gateway = gw[2]
|
65 |
host = socket.gethostname()
|
66 |
-
print(result)
|
67 |
return ip_address
|
68 |
else:
|
69 |
result['id'] = os.name + " not supported yet."
|
|
|
54 |
result = "Running on Windows"
|
55 |
hostname = socket.gethostname()
|
56 |
ip_address = socket.gethostbyname(hostname)
|
|
|
57 |
return ip_address
|
58 |
elif os.name == "posix":
|
59 |
gw = os.popen("ip -4 route show default").read().split()
|
|
|
62 |
ip_address = s.getsockname()[0]
|
63 |
gateway = gw[2]
|
64 |
host = socket.gethostname()
|
|
|
65 |
return ip_address
|
66 |
else:
|
67 |
result['id'] = os.name + " not supported yet."
|