summaryrefslogtreecommitdiff
path: root/kpov_judge/web
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 03:30:56 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-13 03:30:56 +0200
commit64885ef1675f32cc3ce9d59aa0f6c31064338eec (patch)
tree43d54fc04826f87761edae5c1420443568763fa1 /kpov_judge/web
parent4abbcde4b21be7d3c07a2d483c23a951ff57cb12 (diff)
web.results_post: call task_check with defaultdict(str)
Many tasks barf on missing keys.
Diffstat (limited to 'kpov_judge/web')
-rwxr-xr-xkpov_judge/web/kpov_judge/kpov_judge.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py
index db2359d..2febf9a 100755
--- a/kpov_judge/web/kpov_judge/kpov_judge.py
+++ b/kpov_judge/web/kpov_judge/kpov_judge.py
@@ -92,8 +92,7 @@ def results_post(class_id, task_id, results):
task_check_source = db.task_checkers.find_one({'class_id': class_id, 'task_id': task_id})['source']
d = {}
exec(compile(task_check_source, 'checker.py', 'exec'), globals(), d)
- # raise Exception(str(params))
- res, hints = d['task_check'](results, params)
+ res, hints = d['task_check'](collections.defaultdict(str, results), params)
except Exception as e:
hints = ["Checker died: " + str(e)]
res = 0