Commit 88de0280 authored by Marc's avatar Marc
Browse files

Allow AG parser to work without any jeu.

parent 87d98158
......@@ -449,6 +449,10 @@ _raw_data: Dict[Date, Tuple[LineToAdd, JeuToAdd, LineToDelete]] = {
(7, 'Quels sont les 15 pays les plus peuplés du monde ?'),
], [], []
),
(2021, 8, 23): (
[
], [], []
),
}
data: Dict[datetime.date, Tuple[List[Tuple[int, str]], List[Tuple[int, Tuple[str, str, str]]], List[int]]] = {
......
......@@ -45,7 +45,10 @@ class AGParser(ARParser):
return date in cls._to_insert_by_date or datetime.date(2021, 1, 11) <= date < datetime.date(2021, 3, 1)
def _get_jeux_list(self) -> List[str]:
jeux: List[str] = super(AGParser, self)._get_jeux_list()
try:
jeux: List[str] = super(AGParser, self)._get_jeux_list()
except IndexError:
jeux: List[str] = []
to_insert: List[Tuple[int, str]] = self._to_insert_by_date[self.requested_date][0]
to_delete: List[int] = self._to_insert_by_date[self.requested_date][2]
to_delete.sort(reverse=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment