diff --git a/i2p2www/downloads.py b/i2p2www/downloads.py
index 74e285b0ee15465f341d45817b59a2914dceaf78..dfe50887dd7ff5395522422b4a6a4d1af4f33cd0 100644
--- a/i2p2www/downloads.py
+++ b/i2p2www/downloads.py
@@ -95,7 +95,7 @@ def downloads_redirect(version, net, protocol, domain, file):
         }
 
     if not protocol:
-        protocol = mirrors.leys()[randint(0, len(mirrors) - 1)]
+        protocol = mirrors.keys()[randint(0, len(mirrors) - 1)]
     if not protocol in mirrors:
         abort(404)
     mirrors=mirrors[protocol]