Fix minor errors

This commit is contained in:
Igor Chubin 2021-10-31 21:56:50 +01:00
parent 2c87386eea
commit 2b6db3a0c6
2 changed files with 5 additions and 0 deletions

View file

@ -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:

View file

@ -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)