Fix conn requests without via...

This commit is contained in:
Klaus-Uwe Mitterer 2017-10-02 21:31:06 +02:00
parent 656e4b9b49
commit bddef6c491

View file

@ -136,7 +136,7 @@ def connRequest(frm, to, count = 3, time = datetime.datetime.now(), mode = False
yield conn
def worker(frm, to, count = 3, time = datetime.datetime.now(pytz.timezone("Europe/Vienna")), mode = False, details = False, json = False, via = None):
conns = list(connRequest(getStation(frm), getStation(to), count, time, mode, details, [getStation(vst) for vst in via]))
conns = list(connRequest(getStation(frm), getStation(to), count, time, mode, details, [getStation(vst) for vst in via] if via else []))
output = """<?xml version="1.0" encoding="UTF-8"?>
<connections>