summaryrefslogtreecommitdiff
path: root/kpov_judge/test_prepare_disks.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-05 18:04:45 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-05 18:04:45 +0200
commit772532d87cc97828d1e29c0ca91f50112f5a6ede (patch)
tree23cb1188889cd115c525cc3fe83a3a0adb332cac /kpov_judge/test_prepare_disks.py
parentc54584bf5ae0b4973464da1e033c6628b82e9cd5 (diff)
Pass globals() to exec calls
Diffstat (limited to 'kpov_judge/test_prepare_disks.py')
-rwxr-xr-xkpov_judge/test_prepare_disks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kpov_judge/test_prepare_disks.py b/kpov_judge/test_prepare_disks.py
index 8d0d8c1..a03bb0c 100755
--- a/kpov_judge/test_prepare_disks.py
+++ b/kpov_judge/test_prepare_disks.py
@@ -159,7 +159,7 @@ if __name__ == '__main__':
req = urllib.request.Request("{task_url}/{task_name}/task.py".format(**params))
source = urllib.request.urlopen(req).read()
d = {}
- exec(compile(source, 'task.py', 'exec'), d)
+ exec(compile(source, 'task.py', 'exec'), globals(), d)
computers, prepare_disks = d['computers'], d['prepare_disks']
except Exception as e:
print(e)