Skip to content

Commit

Permalink
Merge pull request #39 from curtisgibby/patch-1
Browse files Browse the repository at this point in the history
Add parsing for full Canadian postal codes (issue #38)
  • Loading branch information
daspecster committed Jul 20, 2012
2 parents f73827f + dba7095 commit addd7af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zipapiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def do_GET(s):
if the_country is None:
the_country = 'US'

if the_country == 'CA':
the_zip = the_zip[:3]

the_zip = [the_zip.split('-')[0]][0]

if the_zip:
Expand Down

0 comments on commit addd7af

Please sign in to comment.