mirror of
https://github.com/chubin/wttr.in.git
synced 2025-08-13 23:38:24 +02:00
typos fixed (fixes #267)
This commit is contained in:
@ -153,7 +153,7 @@ def location_canonical_name(location):
|
|||||||
"Find canonical name for `location`"
|
"Find canonical name for `location`"
|
||||||
|
|
||||||
location = location_normalize(location)
|
location = location_normalize(location)
|
||||||
if location in LOCATION_ALIAS:
|
if location.lower() in LOCATION_ALIAS:
|
||||||
return LOCATION_ALIAS[location.lower()]
|
return LOCATION_ALIAS[location.lower()]
|
||||||
return location
|
return location
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ def location_processing(location, ip_addr):
|
|||||||
tmp_location = location_canonical_name(location)
|
tmp_location = location_canonical_name(location)
|
||||||
if tmp_location != location:
|
if tmp_location != location:
|
||||||
override_location_name = location
|
override_location_name = location
|
||||||
locaiton = tmp_location
|
location = tmp_location
|
||||||
|
|
||||||
# up to this point it is possible that the name
|
# up to this point it is possible that the name
|
||||||
# contains some unicode symbols
|
# 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):
|
or 'API key has reached calls per day allowed limit' in str(exception):
|
||||||
if html_output:
|
if html_output:
|
||||||
return _wrap_response(MALFORMED_RESPONSE_HTML_PAGE, 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)
|
logging.error("Exception has occured", exc_info=1)
|
||||||
return "ERROR"
|
return "ERROR"
|
||||||
|
Reference in New Issue
Block a user