summaryrefslogtreecommitdiff
path: root/mirrors/utils.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-12 01:13:25 -0600
committerDan McGee <dan@archlinux.org>2010-12-12 01:13:32 -0600
commit1553e2b5c93f1a8566af4ed07630910fce6bc3b1 (patch)
treef054382f2ddc2d6b9e64b3ef381fbd639f574d0c /mirrors/utils.py
parenta6e3f101e98e024ed6bc5c5d8043133294883bb0 (diff)
Use check count for this URL, not max of all mirrors
Prevents a recently enabled mirror from getting unfairly represented as far as completion percentage goes. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/utils.py')
-rw-r--r--mirrors/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrors/utils.py b/mirrors/utils.py
index c64d53c5..124b66e6 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -51,7 +51,7 @@ def get_mirror_statuses(cutoff=default_cutoff):
check_frequency = None
for url in urls:
- url.completion_pct = float(url.success_count) / num_checks
+ url.completion_pct = float(url.success_count) / url.check_count
if url.id in delays:
url_delays = delays[url.id]
d = sum(url_delays, datetime.timedelta()) / len(url_delays)