diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-03-26 06:42:21 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-03-26 07:58:03 +0100 |
commit | 72c73e0a9d316c6a167f02d74f07b551670352bf (patch) | |
tree | 7796e98bb9ce05fb6201a396c58dd97cf6c95ae6 | |
parent | b22e059f3100ac5f827a16bb9cd2c581772d6a6b (diff) |
Only print delays when we got a real time status
-rw-r--r-- | examples/trip-query.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/trip-query.py b/examples/trip-query.py index 30585bf..d848f5e 100644 --- a/examples/trip-query.py +++ b/examples/trip-query.py @@ -71,13 +71,15 @@ def format_full(trips): print(" Departure: %s" % start.props.departure.format("%F %H:%M")) if start.props.dep_plat: print(" Platform: %s" % start.props.dep_plat) - print(" Delay: %s" % start.props.departure_delay) + if start.props.rt_departure: + print(" Delay: %s" % start.props.departure_delay) print(" End: %s" % end.props.name) print(" Arrival: %s" % end.props.arrival.format("%F %H:%M")) if end.props.arr_plat: print(" Platform: %s" % end.props.arr_plat) print(" Line: %s" % part.props.line) - print(" Delay: %s" % end.props.arrival_delay) + if end.props.rt_arrival: + print(" Delay: %s" % end.props.arrival_delay) if part.props.stops and len(part.props.stops) > 0: print(" %s Stops: %s" % (len(part.props.stops), ", ".join([s.props.name for s in part.props.stops]))) |