From dc6c987add13432e63469d601f8c4c0afa423ca5 Mon Sep 17 00:00:00 2001 From: str4d Date: Fri, 30 Aug 2013 13:27:39 +0000 Subject: [PATCH] Fixed 'any mirror' download redirect --- i2p2www/downloads.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i2p2www/downloads.py b/i2p2www/downloads.py index 2a347745..7d40a4f6 100644 --- a/i2p2www/downloads.py +++ b/i2p2www/downloads.py @@ -73,4 +73,5 @@ def downloads_redirect(version, protocol, domain, file): if not domain in mirrors: abort(404) return redirect(mirrors[domain]['url'] % data) - return redirect(mirrors[randint(0, len(mirrors) - 1)]['url'] % data) + randomain = mirrors.keys()[randint(0, len(mirrors) - 1)] + return redirect(mirrors[randomain]['url'] % data)