Commit
·
7efe916
1
Parent(s):
2ec0b1e
Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,7 @@ def get_device_ip_address():
|
|
46 |
ip_address = socket.gethostbyname(hostname)
|
47 |
result['ip_addr'] = ip_address
|
48 |
result['host'] = hostname
|
|
|
49 |
return result
|
50 |
elif os.name == "posix":
|
51 |
gw = os.popen("ip -4 route show default").read().split()
|
@@ -56,9 +57,11 @@ def get_device_ip_address():
|
|
56 |
host = socket.gethostname()
|
57 |
result['ip_addr'] = ipaddr
|
58 |
result['host'] = host
|
|
|
59 |
return result
|
60 |
else:
|
61 |
-
result = os.name + " not supported yet."
|
|
|
62 |
return result
|
63 |
|
64 |
def generate_questions(article,num_que):
|
|
|
46 |
ip_address = socket.gethostbyname(hostname)
|
47 |
result['ip_addr'] = ip_address
|
48 |
result['host'] = hostname
|
49 |
+
print(result)
|
50 |
return result
|
51 |
elif os.name == "posix":
|
52 |
gw = os.popen("ip -4 route show default").read().split()
|
|
|
57 |
host = socket.gethostname()
|
58 |
result['ip_addr'] = ipaddr
|
59 |
result['host'] = host
|
60 |
+
print(result)
|
61 |
return result
|
62 |
else:
|
63 |
+
result['id'] = os.name + " not supported yet."
|
64 |
+
print(result)
|
65 |
return result
|
66 |
|
67 |
def generate_questions(article,num_que):
|