From d7863521951c703e9e969eb056444873df0de9c9 Mon Sep 17 00:00:00 2001
From: "gasperfele@fri1.uni-lj.si"
 <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>
Date: Tue, 20 Jan 2015 06:57:28 +0000
Subject: fixed import in gen_params for radius_mysql_pam

git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@217 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
---
 kpov_judge/tasks/radius_mysql_pam/task.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'kpov_judge/tasks/radius_mysql_pam')

diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py
index cd0fb46..0c656d5 100644
--- a/kpov_judge/tasks/radius_mysql_pam/task.py
+++ b/kpov_judge/tasks/radius_mysql_pam/task.py
@@ -99,12 +99,12 @@ def gen_params(user_id, params_meta):
     params = dict()
     r = random.Random(user_id)
     for name, meta in params_meta.iteritems():
-        params[name] = default_generators[meta.get('type', None)](r)
-    params['RADIUS_SECRET'] = alnum_gen(r, 8)
-    params['RADIUS_PASSWORD'] = alnum_gen(r, 4)
-    params['MYSQL_ADMIN_PASSWORD'] = alnum_gen(r, 4)
-    net = IPv4_subnet_gen(r)
-    ip_radius_server = IPv4_addr_gen(r, net, 1)[0]
+        params[name] = kpov_random_helpers.default_generators[meta.get('type', None)](r)
+    params['RADIUS_SECRET'] = kpov_random_helpers.alnum_gen(r, 8)
+    params['RADIUS_PASSWORD'] = kpov_random_helpers.alnum_gen(r, 4)
+    params['MYSQL_ADMIN_PASSWORD'] = kpov_random_helpers.alnum_gen(r, 4)
+    net = kpov_random_helpers.IPv4_subnet_gen(r)
+    ip_radius_server = kpov_random_helpers.IPv4_addr_gen(r, net, 1)[0]
     params['IP_RS'] = ip_radius_server
     return params
 
-- 
cgit v1.2.1