Fix minor errors

pull/675/head
Igor Chubin 3 years ago
parent 2c87386eea
commit 2b6db3a0c6

@ -334,6 +334,8 @@ def _get_hemisphere(location):
""" """
if all(location): if all(location):
location_string = ", ".join(location) location_string = ", ".join(location)
else:
return True
geolocation = _geolocator(location_string) geolocation = _geolocator(location_string)
if geolocation is None: if geolocation is None:

@ -210,6 +210,9 @@ def _response(parsed_query, query, fast_mode=False):
# so we handle it with all available logic # so we handle it with all available logic
loc = (parsed_query['orig_location'] or "").lower() loc = (parsed_query['orig_location'] or "").lower()
if parsed_query.get("view"): if parsed_query.get("view"):
if not parsed_query.get("location"):
parsed_query["location"] = loc
output = wttr_line(query, parsed_query) output = wttr_line(query, parsed_query)
elif loc == 'moon' or loc.startswith('moon@'): elif loc == 'moon' or loc.startswith('moon@'):
output = get_moon(parsed_query) output = get_moon(parsed_query)

Loading…
Cancel
Save