summaryrefslogtreecommitdiffstats
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-21 17:43:39 -0500
committerDan McGee <dan@archlinux.org>2010-09-21 17:43:39 -0500
commit753329659e3edf725881bbfd89d7c25034e41c2f (patch)
treef094bb20f9709736cb5349dba4ed39e2152d6545 /mirrors
parentb3883820a249a0bb6ba6237f815b8cdffd630fcd (diff)
downloadarchweb-753329659e3edf725881bbfd89d7c25034e41c2f.tar.gz
archweb-753329659e3edf725881bbfd89d7c25034e41c2f.zip
Prevent 500 if no mirror checks have ranrelease_2010-09-21
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index 59d6337b..b13c9148 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -78,7 +78,10 @@ def status(request):
error_count=Count('error'), last_occurred=Max('check_time')
).order_by('-last_occurred', '-error_count')
- last_check = max([u.last_check for u in urls])
+ if urls:
+ last_check = max([u.last_check for u in urls])
+ else:
+ last_check = None
good_urls = []
bad_urls = []