From 7d5644d3e7b1362820a7820bdf98e1209a30de68 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 28 Sep 2020 22:52:48 +0300 Subject: Fix GeoIP path configs --- iss/geo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iss/geo.py') diff --git a/iss/geo.py b/iss/geo.py index 55c8f02..5413913 100644 --- a/iss/geo.py +++ b/iss/geo.py @@ -2,7 +2,7 @@ from collections import namedtuple import geoip2.database import geoip2.errors -from .config import GEOIP_CITY_PATH +from .config import GEOIP_GEOLITE2_CITY_PATH DEFAULT_LOCATION = { "latitude": 34.7641, @@ -16,7 +16,7 @@ default_location = namedtuple("Location", DEFAULT_LOCATION.keys())( def get_location(ip): - with geoip2.database.Reader(GEOIP_CITY_PATH) as reader: + with geoip2.database.Reader(GEOIP_GEOLITE2_CITY_PATH) as reader: try: res = reader.city(ip) return res.location -- cgit v1.3.1