From 1b0888c6f00373bede728871883277181653b623 Mon Sep 17 00:00:00 2001 From: Zakharenkov Alexey Date: Wed, 22 Jul 2020 10:37:04 +0300 Subject: [PATCH] Avoid false 'Missing station=' error --- subway_structure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subway_structure.py b/subway_structure.py index 05795a3..98df2f8 100644 --- a/subway_structure.py +++ b/subway_structure.py @@ -751,7 +751,11 @@ class Route: if is_under_construction: continue - if el['tags'].get('railway') in ('station', 'halt'): + if Station.is_station(el, city.modes): + # A station may be not included into this route due to previous + # 'stop area has multiple stations' error. No other error message is needed. + pass + elif el['tags'].get('railway') in ('station', 'halt'): city.error('Missing station={} on a {}'.format(self.mode, m['role']), el) else: actual_role = RouteStop.get_actual_role(el, m['role'], city.modes)