Browse Source

Fix minor errors

pull/675/head
Igor Chubin 5 years ago
parent
commit
2b6db3a0c6
2 changed files with 5 additions and 0 deletions
  1. +2
    -0
      lib/location.py
  2. +3
    -0
      lib/wttr_srv.py

+ 2
- 0
lib/location.py 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:


+ 3
- 0
lib/wttr_srv.py 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)


Loading…
Cancel
Save