summaryrefslogtreecommitdiff
path: root/mirrors/management/commands/mirrorresolv.py
diff options
context:
space:
mode:
Diffstat (limited to 'mirrors/management/commands/mirrorresolv.py')
-rw-r--r--mirrors/management/commands/mirrorresolv.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index 85a3c654..0e71894b 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -32,7 +32,7 @@ class Command(NoArgsCommand):
logger.level = logging.ERROR
elif v == 1:
logger.level = logging.WARNING
- elif v == 2:
+ elif v >= 2:
logger.level = logging.DEBUG
return resolve_mirrors()
@@ -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)