Return "error_if"-logic for tram lines count

This commit is contained in:
Alexey Zakharenkov 2021-11-08 12:22:57 +03:00
parent 76d9d0bbb9
commit ef5bbab672

View file

@ -1748,7 +1748,8 @@ class City:
]
)
if self.found_tram_lines != self.num_tram_lines:
self.error(
log_function = self.error if self.found_tram_lines == 0 else self.notice
log_function(
'Found {} tram lines, expected {}'.format(
self.found_tram_lines, self.num_tram_lines
),