Permalink
Browse files

fixed an issue with location showing -'s

  • Loading branch information...
1 parent 84ddaa7 commit 67050a5977eab4fdec6502ecae7b458f84a02507 @kencochrane committed Apr 16, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 pypi_mirrors.py
View
@@ -101,6 +101,12 @@ def location_name(location):
country = location.get('countryName', None)
country_code = location.get('countryCode', None)
+ # clear out the -'s
+ if city and city == '-':
+ city = None
+ if region and region == '-':
+ region = None
+
# If we have everything return everything but only use country_code
if city and region and country_code:
return "{0}, {1} {2}".format(city, region, country_code)

0 comments on commit 67050a5

Please sign in to comment.