self.stats['historical names'] += self.replace("INSERT INTO locations "+
"(name, type, complete_type_id, current_name, is_authoritative) "+
"VALUES (%s, %s, %s, %s, %s)", (hname, short_type, type, name, 1))
+ if (len(parentName)):
+ self.stats['relations'] += self.replace("INSERT INTO location_relations "+
+ "(location_name, parent_location_name) "+
+ "VALUE (%s, %s)", (hname, parentName))
def add_aliases(self, name, items):
if location:
if type == 'continent':
self.stats['continent'] += 1
+ self.warn("Unable to find GeoEthno country in sequence: %s" % str(sequence))
elif type == 'country':
self.stats['country'] += 1
elif type == 'other':
raise "Undetermined location type: %s" % type
else:
self.stats['nomap'] += 1
+ #sys.stdout.write("nomap: %s\n" % str(unmatched))
comment = ", ".join(unmatched)
self.target("UPDATE media_items SET location_name = %s, location_comment = %s WHERE old_code = %s",