server crash fix
This commit is contained in:
parent
c02eb8b741
commit
a38efd3626
@ -60,8 +60,13 @@ ALLOWED_EXTENSIONS = {'csv', 'png'}
|
||||
ticker = pexpect.spawn("sudo -E python3 stockTicker.py")
|
||||
time.sleep(2) # give the ticker time to initialise
|
||||
|
||||
f = open('csv/system_info.json')
|
||||
system_info = json.load(f)
|
||||
f = open('csv/system_info.json', 'w')
|
||||
|
||||
try:
|
||||
system_info = json.load(f)
|
||||
except:
|
||||
system_info = {"update_available": False, "first_boot": False}
|
||||
json.dump(system_info, f)
|
||||
f.close()
|
||||
|
||||
ticker.sendline('*') # run startup gif by default
|
||||
|
Loading…
Reference in New Issue
Block a user