[fix] var

This commit is contained in:
Al
2015-09-03 17:49:52 -04:00
parent 294101ad80
commit 33af61095b

View File

@@ -244,10 +244,10 @@ class AddressFormatter(object):
text = re.sub(regex, replacement, text)
return text
def tokenize_component(self, v):
def tokenize_component(self, value):
tokens = tokenize(value)
if sum((1 for c, t in tokens if c.value < token_types.PERIOD.value)) > 0:
return [t for c, t in tokenize(v)]
return [t for c, t in tokens]
return []
def format_address(self, country, components, minimal_only=True, tag_components=True):