Commit 029185e3 by Corey Koval

Added some error handling.

parent e8c301bf
...@@ -405,6 +405,7 @@ def update_cesium(): ...@@ -405,6 +405,7 @@ def update_cesium():
elif request.query.plotpts == "false": elif request.query.plotpts == "false":
ms.plotintersects = False ms.plotintersects = False
try:
if request.query.ismobile: if request.query.ismobile:
rx_index = int(request.query.ismobile) rx_index = int(request.query.ismobile)
receivers[rx_index].isMobile = True receivers[rx_index].isMobile = True
...@@ -412,6 +413,8 @@ def update_cesium(): ...@@ -412,6 +413,8 @@ def update_cesium():
if request.query.isnotmobile: if request.query.isnotmobile:
rx_index = int(request.query.isnotmobile) rx_index = int(request.query.isnotmobile)
receivers[rx_index].isMobile = False receivers[rx_index].isMobile = False
except IndexError:
print("I got some bad data. Doing nothing out of spite.")
write_czml(*process_data(database_name, geofile)) write_czml(*process_data(database_name, geofile))
return "OK" return "OK"
......
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