Skip to content

Commit

Permalink
Improve lookup failure logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jul 17, 2019
1 parent 85c3048 commit 04810a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.py
Expand Up @@ -282,13 +282,13 @@ def asyncFinishThread(server):
try:
geo = reader.get(server["ip"])
except geoip2.errors.GeoIP2Error:
app.logger.warning("GeoIP lookup failure for %s." % (server["address"],))
app.logger.warning("GeoIP lookup failure for %s." % (server["ip"],))

if geo and "continent" in geo:
server["geo_continent"] = geo["continent"]["code"]
else:
app.logger.warning("Unable to get GeoIP Continent data for %s."
% (server["address"],))
% (server["ip"],))

server["ping"] = serverUp(info[0])
if not server["ping"]:
Expand Down

0 comments on commit 04810a0

Please sign in to comment.