From 7303ae86ba1113344cd1b0df59ffde907ab36da8 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 28 Oct 2018 15:41:39 +0100 Subject: [PATCH] renamed format => filetype; line => format (fixes #230) --- lib/wttr_line.py | 2 +- lib/wttr_srv.py | 2 +- lib/wttrin_png.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wttr_line.py b/lib/wttr_line.py index 81bbf0a..4690779 100644 --- a/lib/wttr_line.py +++ b/lib/wttr_line.py @@ -120,7 +120,7 @@ def wttr_line(location, query): in format `line_format` """ - format_line = query.get('line', '') + format_line = query.get('format', '') if format_line in PRECONFIGURED_FORMAT: format_line = PRECONFIGURED_FORMAT[format_line] diff --git a/lib/wttr_srv.py b/lib/wttr_srv.py index b0a38ab..6eb3e64 100644 --- a/lib/wttr_srv.py +++ b/lib/wttr_srv.py @@ -183,7 +183,7 @@ def wttr(location, request): # We are ready to return the answer try: - if 'line' in query: + if 'format' in query: return wttr_line(location, query) if png_filename: diff --git a/lib/wttrin_png.py b/lib/wttrin_png.py index 281efe9..ca2ad50 100644 --- a/lib/wttrin_png.py +++ b/lib/wttrin_png.py @@ -270,7 +270,7 @@ def make_wttrin_query(parsed): for key, val in parsed.items(): args.append('%s=%s' % (key, val)) - args.append('format=png') + args.append('filetype=png') url = "http://wttr.in/%s" % location if args != []: