Handle invalid IPs by using the failback IP if it is not found in the DB
This commit is contained in:
parent
d7f8bf83a0
commit
122f198857
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ INFLUX_PAYLOAD = [
|
||||||
for session in SESSIONS.keys():
|
for session in SESSIONS.keys():
|
||||||
try:
|
try:
|
||||||
geodata = geo_lookup(SESSIONS[session]['ip_address_public'])
|
geodata = geo_lookup(SESSIONS[session]['ip_address_public'])
|
||||||
except ValueError:
|
except (ValueError, geoip2.errors.AddressNotFoundError):
|
||||||
if configuration.tautulli_failback_ip:
|
if configuration.tautulli_failback_ip:
|
||||||
geodata = geo_lookup(configuration.tautulli_failback_ip)
|
geodata = geo_lookup(configuration.tautulli_failback_ip)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue