summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2015-06-18 16:00:20 -0500
committerDan McGee <dan@archlinux.org>2015-06-18 16:00:20 -0500
commitb28b46befab52548968a19c068ad5108adaa84a8 (patch)
tree273c5d9162b2fba7bbefeb02ca0b810cbaebb9df
parent68d85d0526ee605bb661de40387d0dde7f015953 (diff)
Silence DNS errors we see too often in production
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/management/commands/mirrorresolv.py5
1 files changed, 5 insertions, 0 deletions
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)