From 4b8bf96c1c0cc09562b65f1a94a53e633bfc656f Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Sun, 12 Jul 2020 03:20:19 +0200 Subject: [PATCH] spansh.py: fixed tripping over missing parameter --- spansh.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/spansh.py b/spansh.py index 14f399d..cfc6115 100755 --- a/spansh.py +++ b/spansh.py @@ -162,26 +162,26 @@ APIURLS = { "stations": "https://spansh.co.uk/api/stations/search", "systems": "https://spansh.co.uk/api/systems/search", } -FILTERS = { - "updated_at": - { - "value": [ - "2017-11-06", - (datetime.now() - timedelta(days=args.minage)).strftime("%Y-%m-%d") - ], - "comparison": "<=>" - } - } -SORT = { - "updated_at": { - "direction": "asc" - } - } try: if args.subcommand == "nearestsystem": out = getNearestSystem(args.coordinate) elif args.subcommand == "oldstations": + FILTERS = { + "updated_at": + { + "value": [ + "2017-11-06", + (datetime.now() - timedelta(days=args.minage)).strftime("%Y-%m-%d") + ], + "comparison": "<=>" + } + } + SORT = { + "updated_at": { + "direction": "asc" + } + } if args.system: out = getOldStationsInSystem(args.system) else: