From 82341642f49e15ee49a280f49f61d9f2402acd31 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 30 Jun 2016 22:02:17 -0700 Subject: [PATCH] Missing GeoLite2 database message link to settings page --- plexpy/helpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index 0c4bb96b..8a8c3342 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -579,7 +579,8 @@ def install_geoip_db(): def geoip_lookup(ip_address): if not plexpy.CONFIG.GEOIP_DB: - return 'GeoLite2 database not installed. Please install from the Settings page.' + return 'GeoLite2 database not installed. Please install from the ' \ + 'Settings page.' if not ip_address: return 'No IP address provided.' @@ -589,7 +590,8 @@ def geoip_lookup(ip_address): geo = reader.city(ip_address) reader.close() except IOError as e: - return 'Missing GeoLite2 database. Please reinstall from the Settings page.' + return 'Missing GeoLite2 database. Please reinstall from the ' \ + 'Settings page.' except ValueError as e: return 'Unable to read GeoLite2 database: %s' % e except maxminddb.InvalidDatabaseError as e: