From cecde8fec8b7a0328bac07613cc11041b0b5e780 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Mon, 27 Apr 2020 20:40:13 +0200 Subject: [PATCH] fixed location for localhost --- lib/location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/location.py b/lib/location.py index f47e833..20f5a12 100644 --- a/lib/location.py +++ b/lib/location.py @@ -264,7 +264,7 @@ def location_processing(location, ip_addr): # if location is not None and location.upper() in IATA_CODES: # location = '~%s' % location - if location is not None and location.startswith('~'): + if location is not None and not location.startswith("~-,") and location.startswith('~'): geolocation = geolocator(location_canonical_name(location[1:])) if geolocation is not None: if not override_location_name: