We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a31149 commit 9b66af0Copy full SHA for 9b66af0
tin/apps/submissions/tasks.py
@@ -101,8 +101,9 @@ def run_submission(submission_id):
101
python=python_exe,
102
)
103
104
- with open(submission_wrapper_path, "w", encoding="utf-8") as f:
105
- f.write(wrapper_text)
+ with open(submission_wrapper_path, "w", encoding="utf-8") as f_obj:
+ f_obj.write(wrapper_text)
106
+
107
os.chmod(submission_wrapper_path, 0o700)
108
except OSError:
109
submission.grader_output = (
@@ -281,4 +282,4 @@ def run_submission(submission_id):
281
282
283
284
with contextlib.suppress(FileNotFoundError):
- os.unlink(submission_wrapper_path)
285
+ os.remove(submission_wrapper_path)
0 commit comments