From c8341c5d846f5f50640004192ca03381243f7eac Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Fri, 30 Aug 2019 18:10:22 +0200 Subject: [PATCH] do not display location for 0-day queries (#342) --- lib/wttr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/wttr.py b/lib/wttr.py index b215b1a..b1724cd 100644 --- a/lib/wttr.py +++ b/lib/wttr.py @@ -168,7 +168,9 @@ def get_wetter(location, ip, html=False, lang=None, query=None, location_name=No if full_address \ and query.get('format', 'txt') != 'png' \ - and (not query.get('no-city') and not query.get('no-caption')): + and (not query.get('no-city') + and not query.get('no-caption') + and not query.get('days') == '0'): line = "%s: %s [%s]\n" % ( get_message('LOCATION', lang).encode('utf-8'), full_address.encode('utf-8'),