diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-24 21:05:27 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2019-02-24 21:05:27 +0100 |
commit | 8081a5520a441b43a8a7a73f3a90c7aacfaa8e10 (patch) | |
tree | c7f49bd33ed19d53afc0ee9df8b2c82c200c5910 /kpov_judge/util.py | |
parent | 9963b74f777edf985540eac71b1ca095f88b8bca (diff) |
Move everything one level up
Diffstat (limited to 'kpov_judge/util.py')
-rw-r--r-- | kpov_judge/util.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/kpov_judge/util.py b/kpov_judge/util.py deleted file mode 100644 index 6d9e085..0000000 --- a/kpov_judge/util.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -import yaml - -def write_default_config(disk, global_params): - home = '/home/test' - params_file = os.path.join(home, '.kpov_params.yaml') - default_params = {} - for k in [ - 'task_name', - 'username', - 'task_url']: - if k in global_params: - default_params[k] = global_params[k] - disk.write(params_file, yaml.dump(default_params)) - disk.chown(1001, 1001, params_file) - - mydir = os.path.dirname(os.path.abspath(__file__)) - # write testing script and helper - for f in ['test_task.py', 'kpov_util.py']: - src = os.path.join(mydir, f) - dst = os.path.join('/home/test', f) - disk.write(dst, open(src).read()) - disk.chmod(0o755, dst) - disk.copy_in(os.path.join(mydir, 'random_data'), '/home/test') |