mirror of
https://github.com/chubin/wttr.in
synced 2024-11-15 00:27:09 +00:00
Fix minor errors
This commit is contained in:
parent
2c87386eea
commit
2b6db3a0c6
2 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue