From 87999e1ebb4e2d754cfde6b5e23407aa7ce58251 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Thu, 12 Oct 2017 15:55:36 +0300 Subject: [PATCH] Use name instead of el_id for ambiguous station error message --- subway_structure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subway_structure.py b/subway_structure.py index 260a018..ddea68d 100644 --- a/subway_structure.py +++ b/subway_structure.py @@ -151,10 +151,10 @@ class Route: k = el_id(m) if k in city.stations: st_list = city.stations[k] + st = st_list[0] if len(st_list) > 1: city.error('Ambigous station {} in route. Please use stop_position or split ' - 'interchange stations'.format(k), relation) - st = st_list[0] + 'interchange stations'.format(st.name), relation) if not self.stops or self.stops[-1] != st: if enough_stops: if st not in self.stops: