diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-10-02 13:33:54 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-10-02 13:33:54 +0000 |
commit | 68e25d05abcd7d97057951895f912f36fb505039 (patch) | |
tree | 749c7a8b98b5811d2e90995ec85149cef165657f /kpov_judge | |
parent | b051fd0fdd076f26f0d8c2c6ad66761655d0f982 (diff) |
fixed the default task_check in add_task.py
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@356 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rwxr-xr-x | kpov_judge/add_task.py | 5 |
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) |