summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 01:29:41 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 01:29:41 -0400
commit90873ef7de4bf842fbf6971836a373c555cfcbaa (patch)
tree52608c90e8a0fa13b1f2b4ccfade1d9162beb5d1 /mirrors
parent65e3ef63f7475a217da5205a788f52f3888ebea7 (diff)
parent7a8b5707b277f052b712c51574b0e28834b5a5f8 (diff)
Merge branch 'archweb-generic' into master-nomake
Diffstat (limited to 'mirrors')
-rw-r--r--mirrors/utils.py1
-rw-r--r--mirrors/views.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/mirrors/utils.py b/mirrors/utils.py
index 51daf50e..930adb8d 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -141,6 +141,7 @@ def get_mirror_statuses(cutoff=DEFAULT_CUTOFF, mirror_id=None, show_all=False):
else:
check_frequency = None
else:
+ urls = []
last_check = None
num_checks = 0
check_frequency = None
diff --git a/mirrors/views.py b/mirrors/views.py
index c2736da8..cffafbf5 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -193,6 +193,8 @@ def mirror_details(request, name):
def mirror_details_json(request, name):
authorized = request.user.is_authenticated()
mirror = get_object_or_404(Mirror, name=name)
+ if not authorized and (not mirror.public or not mirror.active):
+ raise Http404
status_info = get_mirror_statuses(mirror_id=mirror.id,
show_all=authorized)
data = status_info.copy()