From b28b46befab52548968a19c068ad5108adaa84a8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 18 Jun 2015 16:00:20 -0500 Subject: Silence DNS errors we see too often in production Signed-off-by: Dan McGee --- mirrors/management/commands/mirrorresolv.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py index 85a3c654..fcf13fda 100644 --- a/mirrors/management/commands/mirrorresolv.py +++ b/mirrors/management/commands/mirrorresolv.py @@ -54,6 +54,11 @@ def resolve_mirrors(): if newvals != oldvals: logger.debug("values changed for %s", mirrorurl) mirrorurl.save(update_fields=('has_ipv4', 'has_ipv6')) + except socket.gaierror, e: + if e.errno == socket.EAI_NONAME: + logger.debug("gaierror resolving %s: %s", mirrorurl.hostname, e) + else: + logger.warn("gaierror resolving %s: %s", mirrorurl.hostname, e) except socket.error, e: logger.warn("error resolving %s: %s", mirrorurl.hostname, e) -- cgit v1.2.3-54-g00ecf