Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-15 09:20:42 +0200
committerErich Eckner <git@eckner.net>2018-06-15 09:20:42 +0200
commit800b09afa97ea885bf07085dd71863ae6dd0a078 (patch)
tree5c6f25c65d34cc3531253a7734564aea18908f63
parentd5038733b8d45c155bcfb5ba0035c2f2ca34552e (diff)
upstream version 2018
-rw-r--r--Reflector.py6
-rw-r--r--setup.py2
2 files changed, 6 insertions, 2 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))
diff --git a/setup.py b/setup.py
index af28090..ca52b36 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import time
setup(
name='''Reflector''',
- version=time.strftime('%Y.%m.%d.%H.%M.%S', time.gmtime(1511733550)),
+ version=time.strftime('%Y.%m.%d.%H.%M.%S', time.gmtime(1520114494)),
description='''A Python 3 module and script to retrieve and filter the latest Pacman mirror list.''',
author='''Xyne''',
author_email='''ac xunilhcra enyx, backwards''',