diff --git a/lib/location.py b/lib/location.py index 4192862..7b36e79 100644 --- a/lib/location.py +++ b/lib/location.py @@ -334,6 +334,8 @@ def _get_hemisphere(location): """ if all(location): location_string = ", ".join(location) + else: + return True geolocation = _geolocator(location_string) if geolocation is None: diff --git a/lib/wttr_srv.py b/lib/wttr_srv.py index 4ebc397..e7fe484 100644 --- a/lib/wttr_srv.py +++ b/lib/wttr_srv.py @@ -210,6 +210,9 @@ def _response(parsed_query, query, fast_mode=False): # so we handle it with all available logic loc = (parsed_query['orig_location'] or "").lower() if parsed_query.get("view"): + if not parsed_query.get("location"): + parsed_query["location"] = loc + output = wttr_line(query, parsed_query) elif loc == 'moon' or loc.startswith('moon@'): output = get_moon(parsed_query)