From aa94bf8b45970e1f24d40965629bb1ff61a458ab Mon Sep 17 00:00:00 2001 From: Alexey Zakharenkov Date: Thu, 20 Feb 2020 15:31:09 +0300 Subject: [PATCH] Skip route members in 'inactive' role --- subway_structure.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subway_structure.py b/subway_structure.py index 20fc138..2682249 100644 --- a/subway_structure.py +++ b/subway_structure.py @@ -663,6 +663,8 @@ class Route: seen_platforms = False repeat_pos = None for m in relation['members']: + if 'inactive' in m['role']: + continue k = el_id(m) if k in city.stations: st_list = city.stations[k] @@ -757,7 +759,7 @@ class Route: city.error('{} {} {} is not connected to a station in route'.format( actual_role, m['type'], m['ref']), relation) elif not StopArea.is_track(el): - city.error('Unrecognized member in route', el) + city.error('Unauthorized member {} {} in route'.format(m['type'], m['ref']), relation) if not self.stops: city.error('Route has no stops', relation) elif len(self.stops) == 1: