Added one more check for correct response return

This commit is contained in:
Profitroll 2023-01-04 10:35:33 +01:00
parent f8b13ccedf
commit 6b6299cd0a

View File

@ -301,6 +301,7 @@ class Client():
find_exception(messages_raw) find_exception(messages_raw)
if "Message" in messages_raw:
for message in messages_raw["Message"]: for message in messages_raw["Message"]:
messages.append(Message(message)) messages.append(Message(message))
@ -402,6 +403,7 @@ class Client():
find_exception(stops_raw) find_exception(stops_raw)
if "stopLocationOrCoordLocation" in stops_raw:
for stop in stops_raw["stopLocationOrCoordLocation"]: for stop in stops_raw["stopLocationOrCoordLocation"]:
if "StopLocation" in stop: if "StopLocation" in stop:
stops.append(Stop(stop["StopLocation"])) stops.append(Stop(stop["StopLocation"]))
@ -504,6 +506,7 @@ class Client():
find_exception(stops_raw) find_exception(stops_raw)
if "stopLocationOrCoordLocation" in stops_raw:
for stop in stops_raw["stopLocationOrCoordLocation"]: for stop in stops_raw["stopLocationOrCoordLocation"]:
if "StopLocation" in stop: if "StopLocation" in stop:
stops.append(Stop(stop["StopLocation"])) stops.append(Stop(stop["StopLocation"]))
@ -697,6 +700,7 @@ class Client():
find_exception(trips_raw) find_exception(trips_raw)
if "Trip" in trips_raw:
for trip in trips_raw["Trip"]: for trip in trips_raw["Trip"]:
trips.append(Trip(trip)) trips.append(Trip(trip))
@ -770,6 +774,7 @@ class Client():
find_exception(trips_raw) find_exception(trips_raw)
if "Trip" in trips_raw:
for trip in trips_raw["Trip"]: for trip in trips_raw["Trip"]:
trips.append(Trip(trip)) trips.append(Trip(trip))