diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-06-26 00:26:25 +0200 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-06-26 00:26:25 +0200 |
commit | 361a3e324adcdba713f267b4456ddcd3ce6294f7 (patch) | |
tree | da0289438eade11547610d0ba71f737efa517213 | |
parent | 09eac8162f56331d0563fceeaaacd578f30f6b1e (diff) | |
download | bvg-grabber-361a3e324adcdba713f267b4456ddcd3ce6294f7.tar.gz bvg-grabber-361a3e324adcdba713f267b4456ddcd3ce6294f7.tar.bz2 bvg-grabber-361a3e324adcdba713f267b4456ddcd3ce6294f7.zip |
Fix issue in the CLI if a bus is explicitly given as a vehicle
-rwxr-xr-x | bvg-grabber.py | 9 |
1 files changed, 5 insertions, 4 deletions
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() + |