Added one more check for correct response return
This commit is contained in:
parent
f8b13ccedf
commit
6b6299cd0a
@ -301,8 +301,9 @@ class Client():
|
||||
|
||||
find_exception(messages_raw)
|
||||
|
||||
for message in messages_raw["Message"]:
|
||||
messages.append(Message(message))
|
||||
if "Message" in messages_raw:
|
||||
for message in messages_raw["Message"]:
|
||||
messages.append(Message(message))
|
||||
|
||||
return messages
|
||||
|
||||
@ -402,11 +403,12 @@ class Client():
|
||||
|
||||
find_exception(stops_raw)
|
||||
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
elif "CoordLocation" in stop:
|
||||
stops.append(Stop(stop["CoordLocation"]))
|
||||
if "stopLocationOrCoordLocation" in stops_raw:
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
elif "CoordLocation" in stop:
|
||||
stops.append(Stop(stop["CoordLocation"]))
|
||||
|
||||
return stops
|
||||
|
||||
@ -504,11 +506,12 @@ class Client():
|
||||
|
||||
find_exception(stops_raw)
|
||||
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
elif "CoordLocation" in stop:
|
||||
stops.append(Stop(stop["CoordLocation"]))
|
||||
if "stopLocationOrCoordLocation" in stops_raw:
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
elif "CoordLocation" in stop:
|
||||
stops.append(Stop(stop["CoordLocation"]))
|
||||
|
||||
return stops
|
||||
|
||||
@ -697,8 +700,9 @@ class Client():
|
||||
|
||||
find_exception(trips_raw)
|
||||
|
||||
for trip in trips_raw["Trip"]:
|
||||
trips.append(Trip(trip))
|
||||
if "Trip" in trips_raw:
|
||||
for trip in trips_raw["Trip"]:
|
||||
trips.append(Trip(trip))
|
||||
|
||||
return trips
|
||||
|
||||
@ -770,7 +774,8 @@ class Client():
|
||||
|
||||
find_exception(trips_raw)
|
||||
|
||||
for trip in trips_raw["Trip"]:
|
||||
trips.append(Trip(trip))
|
||||
if "Trip" in trips_raw:
|
||||
for trip in trips_raw["Trip"]:
|
||||
trips.append(Trip(trip))
|
||||
|
||||
return trips
|
Loading…
Reference in New Issue
Block a user