summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/basic_network_gcc
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-06 23:56:03 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-07 01:55:26 +0200
commit9c51bbe5016495c714789f5df01806a6d366e11a (patch)
tree19be73e896838cfbe3e87b04bd63c9fdd930c27e /kpov_judge/tasks/basic_network_gcc
parente33085889f26c76587fdab2ad600ed336dc028b5 (diff)
Rename kpov_random_helpers to kpov_util
Diffstat (limited to 'kpov_judge/tasks/basic_network_gcc')
-rw-r--r--kpov_judge/tasks/basic_network_gcc/task.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kpov_judge/tasks/basic_network_gcc/task.py b/kpov_judge/tasks/basic_network_gcc/task.py
index ae690f0..c4f54bd 100644
--- a/kpov_judge/tasks/basic_network_gcc/task.py
+++ b/kpov_judge/tasks/basic_network_gcc/task.py
@@ -155,14 +155,14 @@ def task(student_IP, net_prog_name,
def gen_params(user_id, params_meta):
import random
r = random.Random(user_id+'evil cornholio')
- params = kpov_random_helpers.default_gen(user_id, params_meta)
+ params = kpov_util.default_gen(user_id, params_meta)
homedir = '/home/student/'
params['env_c'] = "".join([r.choice('ABCDEFGHIJKLMNPRSTUVZ') for i in range(5)])
params['P_c'] = "".join([r.choice('abcdefghijklmnoprst') for i in range(5)]) + ".c"
params['param_gen_seed'] = str(r.randint(0, 2**24))
params['c_destroy_gen_seed'] = str(r.randint(0, 2**24))
- dest_net = kpov_random_helpers.IPv4_subnet_gen(r, '10.0.2.128/26', 26)
- params['student_IP'] = kpov_random_helpers.IPv4_addr_gen(r, dest_net)[0]
+ dest_net = kpov_util.IPv4_subnet_gen(r, '10.0.2.128/26', 26)
+ params['student_IP'] = kpov_util.IPv4_addr_gen(r, dest_net)[0]
for k in ['P_c', 'P_executable', 'out_stderr_c', 'P_script', 'out_stdout_c']:
params[k] = homedir + params[k]
return params