summaryrefslogtreecommitdiff
path: root/mirrors/management/commands
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-18 15:10:20 -0500
committerDan McGee <dan@archlinux.org>2011-04-18 15:10:20 -0500
commit1b91de94357a60ad372abe4213d1fa52f5fc9c9e (patch)
tree72d5aca838eabda1ff7f02233ef5d4977fc5a7c4 /mirrors/management/commands
parent1e3191ff566bf085f3deefddaa5986cee944dceb (diff)
mirrors: pylint discovered cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/management/commands')
-rw-r--r--mirrors/management/commands/mirrorcheck.py6
-rw-r--r--mirrors/management/commands/mirrorresolv.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py
index 44971c4f..ea43d558 100644
--- a/mirrors/management/commands/mirrorcheck.py
+++ b/mirrors/management/commands/mirrorcheck.py
@@ -13,7 +13,7 @@ from django.core.management.base import NoArgsCommand
from django.db import transaction
from collections import deque
-from datetime import datetime, timedelta
+from datetime import datetime
import logging
import re
import socket
@@ -134,8 +134,8 @@ class MirrorCheckPool(object):
@transaction.commit_on_success
def run(self):
logger.debug("starting threads")
- for t in self.threads:
- t.start()
+ for thread in self.threads:
+ thread.start()
logger.debug("joining on all threads")
self.tasks.join()
logger.debug("processing log entries")
diff --git a/mirrors/management/commands/mirrorresolv.py b/mirrors/management/commands/mirrorresolv.py
index 8a628bd4..4e812f2d 100644
--- a/mirrors/management/commands/mirrorresolv.py
+++ b/mirrors/management/commands/mirrorresolv.py
@@ -49,6 +49,6 @@ def resolve_mirrors():
mirrorurl.has_ipv4, mirrorurl.has_ipv6)
mirrorurl.save(force_update=True)
except socket.error, e:
- logger.warn("error resolving %s: %s", hostname, e)
+ logger.warn("error resolving %s: %s", mirrorurl.hostname, e)
# vim: set ts=4 sw=4 et: