Commit c5899bf5 authored by Kento HASEGAWA's avatar Kento HASEGAWA

Avoid confliction on temporary file names

parent 230bc3fe
......@@ -2,6 +2,7 @@ import argparse
import os
import random
import subprocess
import uuid
proc = None
stop_flag = False
......@@ -28,7 +29,8 @@ def solve(params):
basedir = os.path.abspath(os.path.dirname(__file__))
solution_filepath = f'{basedir}/a.txt'
aid = str(uuid.uuid4())
solution_filepath = f'{basedir}/A{aid}.txt'
if os.path.exists(solution_filepath):
os.remove(solution_filepath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment