renamed format => filetype; line => format (fixes #230)
This commit is contained in:
parent
efac9abc9e
commit
7303ae86ba
3 changed files with 3 additions and 3 deletions
|
|
@ -120,7 +120,7 @@ def wttr_line(location, query):
|
||||||
in format `line_format`
|
in format `line_format`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
format_line = query.get('line', '')
|
format_line = query.get('format', '')
|
||||||
|
|
||||||
if format_line in PRECONFIGURED_FORMAT:
|
if format_line in PRECONFIGURED_FORMAT:
|
||||||
format_line = PRECONFIGURED_FORMAT[format_line]
|
format_line = PRECONFIGURED_FORMAT[format_line]
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ def wttr(location, request):
|
||||||
|
|
||||||
# We are ready to return the answer
|
# We are ready to return the answer
|
||||||
try:
|
try:
|
||||||
if 'line' in query:
|
if 'format' in query:
|
||||||
return wttr_line(location, query)
|
return wttr_line(location, query)
|
||||||
|
|
||||||
if png_filename:
|
if png_filename:
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ def make_wttrin_query(parsed):
|
||||||
for key, val in parsed.items():
|
for key, val in parsed.items():
|
||||||
args.append('%s=%s' % (key, val))
|
args.append('%s=%s' % (key, val))
|
||||||
|
|
||||||
args.append('format=png')
|
args.append('filetype=png')
|
||||||
|
|
||||||
url = "http://wttr.in/%s" % location
|
url = "http://wttr.in/%s" % location
|
||||||
if args != []:
|
if args != []:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue