summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge')
-rwxr-xr-xkpov_judge/add_task.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py
index 9ba49f3..f95f44d 100755
--- a/kpov_judge/add_task.py
+++ b/kpov_judge/add_task.py
@@ -18,7 +18,10 @@ def task_check(results, params):
})
req = urllib2.Request('{task_url}/{task_name}/results.json'.format(task_url=task_url, task_name=task_name), data)
response = urllib2.urlopen(req)
- return response.read()
+ response_dict = json.loads(response.read())
+ hints = response_dict.get('hints', [])
+ hints = [u'status: ' + response_dict.get('status', '')] + hints
+ return response_dict.get('result', 'No result'), u"\n".join(hints)
uploading_task_check_source = inspect.getsource(task_check)