Fix empty network comparing with route_master

This commit is contained in:
Ilya Zverev 2017-10-18 11:01:48 +03:00
parent 0c87795c76
commit 258b209369

View file

@ -230,13 +230,13 @@ class RouteMaster:
def add(self, route, city):
if not self.network:
self.network = route.network
elif route.network != self.network:
elif route.network and route.network != self.network:
city.error('Route has different network ("{}") from master "{}"'.format(
route.network, self.network), route.element)
if not self.colour:
self.colour = route.colour
elif route.colour != self.colour:
elif route.colour and route.colour != self.colour:
city.warn('Route "{}" has different colour from master "{}"'.format(
route.colour, self.colour), route.element)