Commit da052bd7 authored by Markus's avatar Markus

modified hack_count added requirementsfile

parent 9cb69ea6
......@@ -32,7 +32,12 @@ if __name__ == '__main__':
while True :
##fetch usercount
var = urllib.urlopen("http://hack-hro.de/api/users")
device_count = json.loads(var.read().decode())['deviceCount']
#var = urllib.urlopen("http://172.16.42.107:3000/api/users")
json_string = var.read()
json_dict = json.loads(json_string)
device_count = json_dict['deviceCount']
users = json_dict['users']
#####create cache folder if not exsits####
......@@ -43,6 +48,7 @@ if __name__ == '__main__':
####fetch cached vals
try:
cached_data_dict=json.loads(open(CACHE_PATH).read())
count_changed=False
except:
open(CACHE_PATH, 'a').close()
cached_data_dict={
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment