Skip to content

Commit

Permalink
Handle invalid IPs by using the failback IP if it is not found in the DB
Browse files Browse the repository at this point in the history
  • Loading branch information
samwiseg0 committed Sep 26, 2018
1 parent d50a979 commit a5c28f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tautulli.py
Expand Up @@ -72,7 +72,7 @@ def geo_lookup(ipaddress):
for session in SESSIONS.keys():
try:
geodata = geo_lookup(SESSIONS[session]['ip_address_public'])
except ValueError:
except (ValueError, geoip2.errors.AddressNotFoundError):
if configuration.tautulli_failback_ip:
geodata = geo_lookup(configuration.tautulli_failback_ip)
else:
Expand Down

0 comments on commit a5c28f8

Please sign in to comment.