From 2e4971cb614e578746e94bc14dd4ec87e5d49445 Mon Sep 17 00:00:00 2001 From: "mh8810@student.uni-lj.si" Date: Fri, 12 Dec 2014 17:50:52 +0000 Subject: Random zrebana stevilka za studenta git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@55 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'kpov_judge/tasks/copy_rename_20_files_tail_env') diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py index fc05b7f..6758e34 100644 --- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py +++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py @@ -102,6 +102,7 @@ def task(IP_NM, DNS_NM, IP_static, DNS_static): return results def gen_params(user_id, params_meta): + import random params = dict() r = random.Random(user_id) # IP_NM, DNS_NM, IP_static, DNS_static) @@ -110,7 +111,11 @@ def gen_params(user_id, params_meta): params['DNS_NM'] = r.choice(dns_servers) params['IP_NM'], params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2) params['DNS_static'] = r.choice(dns_servers) - return params + count = 0 + while(count