From d0d152b10c3b898b21dd6167a832918cfbc51ce2 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Wed, 28 Aug 2019 13:56:22 +0200 Subject: [PATCH] /Moon minifix --- lib/wttr_srv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wttr_srv.py b/lib/wttr_srv.py index 0a86db2..7c64387 100644 --- a/lib/wttr_srv.py +++ b/lib/wttr_srv.py @@ -267,8 +267,8 @@ def wttr(location, request): # Trying to disable github caching return response - if orig_location.lower() == 'moon' or orig_location.lower().startswith('moon@'): - output = get_moon(location, html=html_output, lang=lang, query=query) + if orig_location and (orig_location.lower() == 'moon' or orig_location.lower().startswith('moon@')): + output = get_moon(orig_location, html=html_output, lang=lang, query=query) else: output = get_wetter(location, ip_addr, html=html_output,