spansh.py: fixed tripping over missing parameter

This commit is contained in:
alterNERDtive 2020-07-12 03:20:19 +02:00
parent 0176f70c86
commit 4b8bf96c1c

View file

@ -162,6 +162,11 @@ APIURLS = {
"stations": "https://spansh.co.uk/api/stations/search", "stations": "https://spansh.co.uk/api/stations/search",
"systems": "https://spansh.co.uk/api/systems/search", "systems": "https://spansh.co.uk/api/systems/search",
} }
try:
if args.subcommand == "nearestsystem":
out = getNearestSystem(args.coordinate)
elif args.subcommand == "oldstations":
FILTERS = { FILTERS = {
"updated_at": "updated_at":
{ {
@ -177,11 +182,6 @@ SORT = {
"direction": "asc" "direction": "asc"
} }
} }
try:
if args.subcommand == "nearestsystem":
out = getNearestSystem(args.coordinate)
elif args.subcommand == "oldstations":
if args.system: if args.system:
out = getOldStationsInSystem(args.system) out = getOldStationsInSystem(args.system)
else: else: