Observe region in geolocator

This commit is contained in:
Gregory Danielson 2020-11-01 20:04:14 -06:00
parent 953284d3d1
commit bd7dd05cca
No known key found for this signature in database
GPG key ID: 88D4EF22F6C14CA7

View file

@ -67,7 +67,7 @@ def location_normalize(location):
def geolocator(location):
"""
Return a GPS pair for specified `location` or None
if nothing can't be found
if nothing can be found
"""
try:
@ -262,9 +262,9 @@ def get_hemisphere(location):
Return hemisphere of the location (True = North, False = South).
Assume North and return True if location can't be found.
"""
location_string = location[0]
if location[1] is not None:
location_string += ",%s" % location[1]
if all(location):
location_string = ", ".join(location)
geolocation = geolocator(location_string)
if geolocation is None:
return True