diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-10 22:04:22 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-10 23:45:40 +0200 |
commit | 3d0d6a04850031bc53e1b8daaf7c3a73b14aaa9c (patch) | |
tree | 04aa593e37b46c96fa6fc355dbdd762466905e36 /kpov_judge/add_task.py | |
parent | 6e23d752f0e3aa2b82c25e572085ad5bf1baffaa (diff) |
add_task: fix reference to instructions
Python 3’s exec does not import symbols into the current namespace.
Diffstat (limited to 'kpov_judge/add_task.py')
-rwxr-xr-x | kpov_judge/add_task.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py index 76eb2ae..7839cce 100755 --- a/kpov_judge/add_task.py +++ b/kpov_judge/add_task.py @@ -95,10 +95,8 @@ if __name__ == '__main__': {'$set': {'source': gen_params_source}}, upsert=True) db.task_params_meta.update({'task_id': task_id, 'class_id': class_id}, {'$set': {'params': d['params_meta']}}, upsert=True) - #instructions = dict([(k, v.encode('utf8')) for k, v in instructions.iteritems()]) - #print instructions db.task_instructions.update({'task_id': task_id, 'class_id': class_id}, - {'$set': instructions}, upsert=True) + {'$set': d['instructions']}, upsert=True) for howto_dir in glob.glob(os.path.join(dirname, 'howtos/*')): howto_lang = os.path.basename(os.path.normpath(howto_dir)) if howto_lang not in {'images'}: |