Fix small bug with temp file name

This commit is contained in:
Oystein Kristoffer Tveit 2021-05-17 22:29:58 +02:00
parent 63882c9da6
commit fffdae7ca6

View File

@ -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