aboutsummaryrefslogtreecommitdiff
path: root/examples/trip-query.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/trip-query.py')
-rw-r--r--examples/trip-query.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/trip-query.py b/examples/trip-query.py
index d848f5e..41b5f68 100644
--- a/examples/trip-query.py
+++ b/examples/trip-query.py
@@ -61,7 +61,8 @@ def format_full(trips):
for trip in trips:
i += 1
j = 0
- print ('Trip #%d' % i)
+ msg = ' - CANCELED' if trip.props.status == Lpf.TripStatusFlags.CANCELED else ''
+ print ('Trip #%d%s' % (i, msg))
for part in trip.props.parts:
j += 1
print(' Part #%d' % j)
@@ -91,7 +92,8 @@ def format_terse(trips):
i = 0
for trip in trips:
i += 1
- print ('Trip #%d' % i)
+ msg = ' - CANCELED' if trip.props.status == Lpf.TripStatusFlags.CANCELED else ''
+ print ('Trip #%d%s' % (i, msg))
start = trip.props.parts[0].props.start
end = trip.props.parts[-1].props.end
print(" Start: %s" % start.props.name)