Make list out of filter
This commit is contained in:
parent
0e67d8599b
commit
497231ebd3
4
run.py
4
run.py
|
@ -35,9 +35,9 @@ def update_display(display, dbi):
|
|||
trains = dbi.calc_real_times(get_trains(dbi, STATION_CODE))
|
||||
trains.sort(key=dbi.time_sort)
|
||||
if PLATFORMS_INCLUDE:
|
||||
trains = filter(lambda t: t['platform'] in PLATFORMS_INCLUDE, trains)
|
||||
trains = list(filter(lambda t: t['platform'] in PLATFORMS_INCLUDE, trains))
|
||||
elif PLATFORMS_EXCLUDE:
|
||||
trains = filter(lambda t: t['platform'] not in PLATFORMS_EXCLUDE, trains)
|
||||
trains = list(filter(lambda t: t['platform'] not in PLATFORMS_EXCLUDE, trains))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
display.info_1.set(OUT_OF_ORDER_TEXT)
|
||||
|
|
Loading…
Reference in New Issue