busroute.py

changeset 98
c07a77c8a070
parent 94
e27c18f080d1
equal deleted inserted replaced
97:6967657fced6 98:c07a77c8a070
10 return 0 10 return 0
11 11
12 def simplify_name(region_name, replace = False): 12 def simplify_name(region_name, replace = False):
13 region = regions.get(region_name) 13 region = regions.get(region_name)
14 if region: 14 if region:
15 if replace and 'replacement' in region and region['replacement'] != region_name: 15 if replace and 'replacement' in region:
16 return simplify_name(region['replacement']) 16 return simplify_name(region['replacement'])
17 return region.get('short_name', region_name) 17 return region.get('short_name', region_name)
18 else: 18 else:
19 return region_name 19 return region_name
20 20

mercurial