summaryrefslogtreecommitdiff
path: root/scraper/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/util.py')
-rw-r--r--scraper/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scraper/util.py b/scraper/util.py
index 0401b342..fdbc0534 100644
--- a/scraper/util.py
+++ b/scraper/util.py
@@ -308,7 +308,9 @@ class AddressBook (object):
for index, line in enumerate(data):
if line[0] == line[1] or line[0] not in entities:
entities[line[0]] = index
- lookup[line[1].lower().strip()] = line[0]
+ name = line[1].lower().strip()
+ if name not in lookup:
+ lookup[name] = line[0]
self.data = data
self.lookup = lookup
self.entities = entities
@@ -460,4 +462,3 @@ def load_countries():
for alt_name in country['alt']:
lookup[alt_name] = name
return lookup
-