typos fixed (fixes #267)

pull/268/head
Igor Chubin 6 years ago
parent 31d9fb7e59
commit f8e7aef267

@ -153,7 +153,7 @@ def location_canonical_name(location):
"Find canonical name for `location`"
location = location_normalize(location)
if location in LOCATION_ALIAS:
if location.lower() in LOCATION_ALIAS:
return LOCATION_ALIAS[location.lower()]
return location
@ -246,7 +246,7 @@ def location_processing(location, ip_addr):
tmp_location = location_canonical_name(location)
if tmp_location != location:
override_location_name = location
locaiton = tmp_location
location = tmp_location
# up to this point it is possible that the name
# contains some unicode symbols

@ -263,6 +263,6 @@ def wttr(location, request):
or 'API key has reached calls per day allowed limit' in str(exception):
if html_output:
return _wrap_response(MALFORMED_RESPONSE_HTML_PAGE, html_output)
return _wrap_response(get_message('CAPACITY_LIMIT_REACHED', lang).encode('utf-6'), html_output)
return _wrap_response(get_message('CAPACITY_LIMIT_REACHED', lang).encode('utf-8'), html_output)
logging.error("Exception has occured", exc_info=1)
return "ERROR"

Loading…
Cancel
Save