From 361a3e324adcdba713f267b4456ddcd3ce6294f7 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Wed, 26 Jun 2013 00:26:25 +0200 Subject: Fix issue in the CLI if a bus is explicitly given as a vehicle --- bvg-grabber.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bvg-grabber.py') diff --git a/bvg-grabber.py b/bvg-grabber.py index fcaf318..b5aa710 100755 --- a/bvg-grabber.py +++ b/bvg-grabber.py @@ -46,12 +46,12 @@ if __name__ == '__main__': if args.limit: limit = args.limit - if bus: - aquery = ActualDepartureQueryApi(args.station) query = ScheduledDepartureQueryApi(args.station, vehicles, limit=limit) res = query.call() - res2 = aquery.call() - res.merge(res2) + if bus: + aquery = ActualDepartureQueryApi(args.station) + res2 = aquery.call() + res.merge(res2) else: query = ActualDepartureQueryApi(args.station) res = query.call() @@ -62,3 +62,4 @@ if __name__ == '__main__': file = open(args.file, 'w') print(res.to_json, file=file) file.close() + -- cgit v1.2.3