summaryrefslogtreecommitdiffstats
path: root/mirrors/management/commands/mirrorresolv.py
diff options
context:
space:
mode:
authorJustin ! <just1602@riseup.net>2020-10-04 00:59:41 -0400
committerjelle van der Waa <jelle@vdwaa.nl>2020-11-11 22:23:29 +0100
commitc6cf91a40df69341dca8cec5e5971ff21cca0e04 (patch)
tree4f3a9de22010a5fd6e10a2d38801635b6d4f8b00 /mirrors/management/commands/mirrorresolv.py
parent34de88278fc4bbcc72f83be4b40df881735f8a35 (diff)
downloadarchweb-c6cf91a40df69341dca8cec5e5971ff21cca0e04.tar.gz
archweb-c6cf91a40df69341dca8cec5e5971ff21cca0e04.zip
Fix pep8 errors
Diffstat (limited to 'mirrors/management/commands/mirrorresolv.py')
-rw-r--r--mirrors/management/commands/mirrorresolv.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index d3d8d5f6..e2981476 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -23,6 +23,7 @@ logging.basicConfig(
stream=sys.stderr)
logger = logging.getLogger()
+
class Command(BaseCommand):
help = "Runs a check on all active mirror URLs to determine if they are reachable via IPv4 and/or v6."
@@ -37,6 +38,7 @@ class Command(BaseCommand):
return resolve_mirrors()
+
def resolve_mirrors():
logger.debug("requesting list of mirror URLs")
for mirrorurl in MirrorUrl.objects.filter(active=True, mirror__active=True):
@@ -48,7 +50,7 @@ def resolve_mirrors():
mirrorurl.has_ipv4 = socket.AF_INET in families
mirrorurl.has_ipv6 = socket.AF_INET6 in families
logger.debug("%s: v4: %s v6: %s", mirrorurl.hostname,
- mirrorurl.has_ipv4, mirrorurl.has_ipv6)
+ mirrorurl.has_ipv4, mirrorurl.has_ipv6)
# now check new values, only update if new != old
newvals = (mirrorurl.has_ipv4, mirrorurl.has_ipv6)
if newvals != oldvals: