Was working on this repo for another feature addition with a friend, so had the refreshTime set to 30 seconds, and every now and again the display would crash out with a KeyError on lt7:et.
File "/home/james/train-departure-display/src/trains.py", line 35, in prepareLocationName
expected_time = location["lt7:et"]
KeyError: 'lt7:et'
Did some delving into the API docs and it seems that the API either returns an estimated time, or an actual time, hence the crash when it couldn't find the 'et' key.
This PR should fix that, I've watched it happen in the last few minutes and the display didn't crash!
Was working on this repo for another feature addition with a friend, so had the refreshTime set to 30 seconds, and every now and again the display would crash out with a KeyError on
lt7:et
.Did some delving into the API docs and it seems that the API either returns an estimated time, or an actual time, hence the crash when it couldn't find the 'et' key.
This PR should fix that, I've watched it happen in the last few minutes and the display didn't crash!