From 72c73e0a9d316c6a167f02d74f07b551670352bf Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Wed, 26 Mar 2014 06:42:21 +0100 Subject: Only print delays when we got a real time status --- examples/trip-query.py | 6 ++++-- 1 file 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]))) -- cgit v1.2.3