From fffdae7ca6a7c65a6fbfa9695087f1598460e9d6 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 17 May 2021 22:29:58 +0200 Subject: [PATCH] Fix small bug with temp file name --- exam_template/python/Python.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exam_template/python/Python.py b/exam_template/python/Python.py index 4ea595d..8178507 100644 --- a/exam_template/python/Python.py +++ b/exam_template/python/Python.py @@ -7,6 +7,8 @@ from common import replaceContent def makeTmpFile(content): fd, path = tempfile.mkstemp() + while ('_' in path): + fd, path = tempfile.mkstemp() with os.fdopen(fd, 'w') as tmp: tmp.write(content) return path