From bd7dd05cca8fd1958d3116a1b1bba0e1122a1008 Mon Sep 17 00:00:00 2001 From: Gregory Danielson Date: Sun, 1 Nov 2020 20:04:14 -0600 Subject: [PATCH] Observe region in geolocator --- lib/location.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/location.py b/lib/location.py index 03cacb4..345375e 100644 --- a/lib/location.py +++ b/lib/location.py @@ -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