[openaddresses adding hack for Honolulu until join function can handle null in OpenAddresses
This commit is contained in:
@@ -277,6 +277,8 @@ class OpenAddressesFormatter(object):
|
|||||||
is_netherlands = country_dir == 'nl'
|
is_netherlands = country_dir == 'nl'
|
||||||
# HACK: remove when join function handles nulls
|
# HACK: remove when join function handles nulls
|
||||||
is_italy = country_dir == 'it'
|
is_italy = country_dir == 'it'
|
||||||
|
# HACK: remove when join function handles nulls
|
||||||
|
is_honololu = path.endswith('honolulu.csv')
|
||||||
|
|
||||||
for row in reader:
|
for row in reader:
|
||||||
try:
|
try:
|
||||||
@@ -304,6 +306,10 @@ class OpenAddressesFormatter(object):
|
|||||||
if key == AddressFormatter.HOUSE_NUMBER and is_netherlands:
|
if key == AddressFormatter.HOUSE_NUMBER and is_netherlands:
|
||||||
value = self.dutch_house_number(value)
|
value = self.dutch_house_number(value)
|
||||||
|
|
||||||
|
# HACK: remove when join function handles nulls
|
||||||
|
if key == AddressFormatter.HOUSE_NUMBER and is_honololu:
|
||||||
|
value = value.strip('- ')
|
||||||
|
|
||||||
# HACK: remove when join function handles nulls
|
# HACK: remove when join function handles nulls
|
||||||
if key == AddressFormatter.HOUSE_NUMBER and is_italy:
|
if key == AddressFormatter.HOUSE_NUMBER and is_italy:
|
||||||
value = self.italian_house_number(value)
|
value = self.italian_house_number(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user