From f29f2f091baa905fcc6f5255764bf26edef8be5e Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 27 Sep 2015 22:49:27 -0400 Subject: [PATCH] [fix] PEBCAK --- scripts/geodata/address_formatting/formatter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/address_formatting/formatter.py b/scripts/geodata/address_formatting/formatter.py index b13c7234..b0e33a83 100644 --- a/scripts/geodata/address_formatting/formatter.py +++ b/scripts/geodata/address_formatting/formatter.py @@ -174,14 +174,14 @@ class AddressFormatter(object): tokens = tokenize_raw(value.strip()) for token_start, token_length, token_type in tokens: start = token_start - if token_type in (comma, hyphen): + if token_type not in (comma, hyphen): break else: start = token_start + token_length for token_start, token_length, token_type in reversed(tokens): end = token_start + token_length - if token_type in (comma, hyphen): + if token_type not in (comma, hyphen): break else: end = token_start