Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/Reflector.py
diff options
context:
space:
mode:
Diffstat (limited to 'Reflector.py')
-rw-r--r--Reflector.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Reflector.py b/Reflector.py
index b4e9efb..b81f910 100644
--- a/Reflector.py
+++ b/Reflector.py
@@ -314,6 +314,10 @@ class MirrorStatus(object):
if not isinstance(mirrors, list):
mirrors = list(mirrors)
+ if not mirrors:
+ logging.warning('no mirrors selected for rating')
+ return mirrors
+
# Ensure a sane number of threads.
if threads < 1:
threads = 1
@@ -401,7 +405,7 @@ class MirrorStatus(object):
# Loop over the mirrors just to ensure that we get the rate for each mirror.
# The value in the loop does not (necessarily) correspond to the mirror.
- for mirror in mirrors:
+ for _ in mirrors:
url, rate, dt = q_out.get()
kibps = rate / 1024.0
logging.info(fmt.format(url, kibps, dt))