From 112ef43aea15426eae6c059e8b4c149fbba26ca7 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 20 Oct 2018 15:41:53 +0200 Subject: [PATCH] minor fixes --- lib/wttr_srv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/wttr_srv.py b/lib/wttr_srv.py index e13f14c..addf63c 100644 --- a/lib/wttr_srv.py +++ b/lib/wttr_srv.py @@ -165,15 +165,15 @@ def wttr(location, request): orig_location = location location, override_location_name, full_address, country, query_source_location = \ - location_processing() + location_processing(location, ip_addr) us_ip = query_source_location[1] == 'US' and 'slack' not in user_agent query = parse_query.metric_or_imperial(query, lang, us_ip=us_ip) - log(" ".join(map(str([ - ip_addr, user_agent, orig_location, location, + log(" ".join(map(str, [ + ip_addr, user_agent, orig_location.encode('utf-8'), location, query.get('use_imperial', False), lang - ])))) + ]))) if country and location != NOT_FOUND_LOCATION: location = "%s, %s" % (location, country)