diff --git a/pyrmv/classes/Board.py b/pyrmv/classes/Board.py index bf4b068..3c16427 100644 --- a/pyrmv/classes/Board.py +++ b/pyrmv/classes/Board.py @@ -63,6 +63,8 @@ class BoardArrival(list): def __init__(self, data: dict, client, retrieve_stops: bool = True): super().__init__([]) + if "Arrival" not in data: + return for line in data["Arrival"]: self.append(LineArrival(line, client, retrieve_stops=retrieve_stops)) @@ -76,6 +78,8 @@ class BoardDeparture(list): def __init__(self, data: dict, client, retrieve_stops: bool = True): super().__init__([]) + if "Departure" not in data: + return for line in data["Departure"]: self.append(LineDeparture(line, client, retrieve_stops=retrieve_stops))