summaryrefslogtreecommitdiff
path: root/mirrors/utils.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
commitf9ae4f860ccf57e84032d7be9426331a9e06e979 (patch)
treec9d837d7e2750d22ba9049abc7cf3c4125f0c9e4 /mirrors/utils.py
parent6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (diff)
parent206000df736fde75a49c3178a8522d17f30a955e (diff)
Merge tag 'release_2012-04-21'
Migrations, moving code around, random small improvements
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 619d5f5c..ddecb095 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -108,7 +108,7 @@ def get_mirror_url_for_download(cutoff=default_cutoff):
status_data = MirrorLog.objects.filter(
check_time__gte=cutoff_time).aggregate(
Max('check_time'), Max('last_sync'))
- if status_data:
+ if status_data['check_time__max'] is not None:
min_check_time = status_data['check_time__max'] - timedelta(minutes=5)
min_sync_time = status_data['last_sync__max'] - timedelta(minutes=30)
best_logs = MirrorLog.objects.filter(is_success=True,