Commit 38549fee authored by Kento HASEGAWA's avatar Kento HASEGAWA

Fix a bug

parent 9d584876
......@@ -355,8 +355,11 @@ class Problem(object):
self.solutions[solution_id] = solution
if solution.status == 'done':
outdir = f"{self.solution_path}/{self.name}"
if not os.path.exists(outdir):
os.mkdir(outdir)
problem_path = self.path
solution_path = f'{self.solution_path}/{self.name}/tmp-{solution.request_id}-{solution.worker}.txt'
solution_path = f'{outdir}/tmp-{solution.request_id}-{solution.worker}.txt'
with open(solution_path, 'w') as fp:
fp.write(solution.solution)
......
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