Commits

Johnny Goodnow  committed 2f09178

* Refactored how google_geocoding returns information on errors.

  • Participants
  • Parent commits c400ed9

Comments (0)

Files changed (3)

File geolocator/google_geocoding.py

 			lng = result['geometry']['location']['lng']
 		except KeyError:
 			raise Warning('No Location Provided')
-			return (None, None, None)
+			return None
 		else:
 			return (addr, lat, lng)

File geolocator/views.py

                 uupid = personInfo['uupid'][0]
                 name = personInfo['displayName'][0]
                 addr = personInfo['localPostalAddress'][0]
-                addr, lat, lng = google_geocoding.get_location(addr)
-                if addr == None:
+                geo_loc = google_geocoding.get_location(addr)
+                if geo_loc == None:
                     continue
+                else:
+                    addr, lat, lng = geo_loc
                 try:
                     phone = personInfo['localPhone'][0]
                 except KeyError:

File resources/database/hokiefinderdb.sqlite3

Binary file modified.