Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- orig/__init__.py 2011-05-05 12:34:14.770879000 -0500
- +++ mine/__init__.py 2011-05-05 12:33:30.790879000 -0500
- @@ -277,9 +277,10 @@
- region = ''
- elif self._databaseType in (CITY_EDITION_REV0, CITY_EDITION_REV1):
- - rec = self._get_record(ipnum)
- - country_code = rec['country_code']
- - region = rec['region_name']
- + rec = self._get_record(ipnum)
- + country_code, region = "", ""
- + if 'country_code' in rec: country_code = rec['country_code']
- + if 'region_name' in rec: region = rec['region_name']
- return {'country_code' : country_code, 'region_name' : region }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement