find_exception is only used in normal methods now
This commit is contained in:
@@ -4,6 +4,7 @@ from pyrmv.enums.location_type import LocationType
|
||||
from pyrmv.enums.lang import Language
|
||||
from pyrmv.enums.selection_mode import SelectionMode
|
||||
from pyrmv.raw.stop_by_coords import stop_by_coords as raw_stop_by_coords
|
||||
from pyrmv.utility.find_exception import find_exception
|
||||
|
||||
try:
|
||||
from typing import Literal
|
||||
@@ -53,6 +54,8 @@ def stop_by_coords(
|
||||
locationSelectionMode=(selection_mode.code).upper()
|
||||
)
|
||||
|
||||
find_exception(stops_raw)
|
||||
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
|
@@ -5,6 +5,7 @@ from pyrmv.enums.lang import Language
|
||||
from pyrmv.enums.selection_mode import SelectionMode
|
||||
from pyrmv.enums.filter_mode import FilterMode
|
||||
from pyrmv.raw.stop_by_name import stop_by_name as raw_stop_by_name
|
||||
from pyrmv.utility.find_exception import find_exception
|
||||
|
||||
try:
|
||||
from typing import Literal
|
||||
@@ -64,9 +65,11 @@ def stop_by_name(
|
||||
radius=radius,
|
||||
refineId=refine_id,
|
||||
stations=stations,
|
||||
filterMode=filter_mode
|
||||
filterMode=filter_mode.code
|
||||
)
|
||||
|
||||
find_exception(stops_raw)
|
||||
|
||||
for stop in stops_raw["stopLocationOrCoordLocation"]:
|
||||
if "StopLocation" in stop:
|
||||
stops.append(Stop(stop["StopLocation"]))
|
||||
|
@@ -4,6 +4,7 @@ from pyrmv.classes.Trip import Trip
|
||||
from pyrmv.raw.trip_find import trip_find as raw_trip_find
|
||||
from pyrmv.enums.rt_mode import RealTimeMode
|
||||
from pyrmv.enums.lang import Language
|
||||
from pyrmv.utility.find_exception import find_exception
|
||||
|
||||
try:
|
||||
from typing import Literal
|
||||
@@ -191,6 +192,8 @@ def trip_find(
|
||||
withFreq=frequency
|
||||
)
|
||||
|
||||
find_exception(trips_raw)
|
||||
|
||||
for trip in trips_raw["Trip"]:
|
||||
trips.append(Trip(trip))
|
||||
|
||||
|
Reference in New Issue
Block a user