mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Format geoip error messages
This commit is contained in:
parent
1df6dadbdd
commit
f5ba168172
5 changed files with 13 additions and 6 deletions
|
@ -593,9 +593,11 @@ def geoip_lookup(ip_address):
|
|||
return 'Missing GeoLite2 database. Please reinstall from the ' \
|
||||
'<a href="settings?install_geoip=true">Settings</a> page.'
|
||||
except ValueError as e:
|
||||
return 'Unable to read GeoLite2 database: %s' % e
|
||||
return 'Unable to read GeoLite2 database. Please reinstall from the ' \
|
||||
'<a href="settings?reinstall_geoip=true">Settings</a> page.'
|
||||
except maxminddb.InvalidDatabaseError as e:
|
||||
return 'Invalid GeoLite2 database.'
|
||||
return 'Invalid GeoLite2 database. Please reinstall from the ' \
|
||||
'<a href="settings?reinstall_geoip=true">Settings</a> page.'
|
||||
except geoip2.errors.AddressNotFoundError as e:
|
||||
return '%s' % e
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue