summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 00:51:40 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 00:51:40 -0400
commit0e7d8abd052418a9dbf79aac43ad388d2d16b043 (patch)
treea883bd585046ba5be7561b3f315c8a57dcbbd15f /mirrors
parent67b87ed4c0abd593e2833b3aa6b969c2e2451b60 (diff)
parent98e3d3126710a827c1ea1296f38e3e29adf37857 (diff)
Merge branch 'mkjs' into archweb-generic
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()