Commit
·
da608ee
1
Parent(s):
b0b9ac1
Update app.py
Browse files
app.py
CHANGED
@@ -53,6 +53,7 @@ def get_device_ip_address():
|
|
53 |
ip_address = s.getsockname()[0]
|
54 |
gateway = gw[2]
|
55 |
host = socket.gethostname()
|
|
|
56 |
return ip_address
|
57 |
else:
|
58 |
result['id'] = os.name + " not supported yet."
|
@@ -105,7 +106,7 @@ def save_data_and_sendmail(article,generated_questions,num_que,result):
|
|
105 |
ip_address = ''
|
106 |
ip_address = get_device_ip_address()
|
107 |
# location = get_location(ip_address)
|
108 |
-
print(
|
109 |
add_csv = [article, generated_questions, num_que, ip_address]
|
110 |
print("data^^^^^",add_csv)
|
111 |
with open(DATA_FILE, "a") as f:
|
|
|
53 |
ip_address = s.getsockname()[0]
|
54 |
gateway = gw[2]
|
55 |
host = socket.gethostname()
|
56 |
+
print("----->",ip_address)
|
57 |
return ip_address
|
58 |
else:
|
59 |
result['id'] = os.name + " not supported yet."
|
|
|
106 |
ip_address = ''
|
107 |
ip_address = get_device_ip_address()
|
108 |
# location = get_location(ip_address)
|
109 |
+
print("ip_address :",ip_address)
|
110 |
add_csv = [article, generated_questions, num_que, ip_address]
|
111 |
print("data^^^^^",add_csv)
|
112 |
with open(DATA_FILE, "a") as f:
|