diff --git a/update.py b/update.py index a22b169..30b65a7 100755 --- a/update.py +++ b/update.py @@ -65,6 +65,12 @@ def update_gwr_advance_ticket_date(config: flask.config.Config) -> None: new_html = requests.get(agenda.gwr.url).text new_dates = agenda.gwr.extract_dates(new_html) + if not new_dates: + subject = "Error parsing GWR advance ticket booking dates" + body = new_html + agenda.mail.send_mail(config, subject, body) + return + assert new_dates assert list(new_dates.keys()) == ["Weekdays", "Saturdays", "Sundays"]