mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-28 15:48:16 +00:00
Debug geoip errors.
This commit is contained in:
parent
b3e692ea79
commit
1703e6c942
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ import socket
|
|||
from .lock import get_lock
|
||||
from .decorators import synchronized
|
||||
from .strformat import unicode_safe
|
||||
from . import log, LOG_CHECK
|
||||
|
||||
# It is unknown if the geoip library is already thread-safe, so
|
||||
# no risks should be taken here by using a lock.
|
||||
|
|
@ -74,6 +75,7 @@ def get_country (host):
|
|||
try:
|
||||
record = get_geoip_record(host)
|
||||
except (geoip_error, socket.error):
|
||||
log.debug(LOG_CHECK, "Geoip error for %r", host, exception=True)
|
||||
# ignore lookup errors
|
||||
return None
|
||||
value = u""
|
||||
|
|
|
|||
Loading…
Reference in a new issue