Currently, the script doesn't handle error conditions due to LOCS unavailability, e.g.:
$ ./get_vans.py
Usage: python get_vans.py [period (default = 5 seconds)] [times (default once) (0 = forever)]
Technician A (34669079467):
Traceback (most recent call last):
File "./get_vans.py", line 59, in <module>
main()
File "./get_vans.py", line 54, in main
print_positions()
File "./get_vans.py", line 28, in print_positions
locs.get_location(locs.technician_A)
File "/home/test2/fiware-livedemoapp/package/location2cb/locs_sim.py", line 260, in get_location
longitude = location["terminalLocation"][0]["currentLocation"]["latitude"]
KeyError: 'currentLocation'
In this case, an error should be printed, e.g.:
$ ./get_vans.py
Usage: python get_vans.py [period (default = 5 seconds)] [times (default once) (0 = forever)]
LOCS service unavailable
Currently, the script doesn't handle error conditions due to LOCS unavailability, e.g.:
In this case, an error should be printed, e.g.: