diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-10-02 08:22:56 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-10-02 08:22:56 +0000 |
commit | c80f2905d6da532e41f1b217de10e387e3b6e76e (patch) | |
tree | bb0dbcbcf8220fc737dc0df250f22d3c72447ff9 /kpov_judge | |
parent | 442646901a7a7e4da45b46cb52b34f2128509840 (diff) |
write_default_config now also pre-sets the username
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@354 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r-- | kpov_judge/util.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kpov_judge/util.py b/kpov_judge/util.py index 66e2707..f92c7c9 100644 --- a/kpov_judge/util.py +++ b/kpov_judge/util.py @@ -1,10 +1,12 @@ import yaml -def write_default_config(disk, params): +def write_default_config(disk, global_params): default_params = dict() for k in [ 'task_name', + 'username', 'task_url']: - if k in params: - default_params[k] = params[k] + if k in global_params: + default_params[k] = global_params[k] disk.write('/home/tester/.kpov_params.yaml', yaml.dump(default_params)) + disk.chown(1001, 1001, "/home/tester/.kpov_params.yaml") |