Skip to content

Commit 4aec192

Browse files
authored
remove os.makedirs that causes exception with default result dir
1 parent abe62a4 commit 4aec192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/cuopt_server/cuopt_server/webserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ def getsolverlogs(
347347
detail=f"Unsupported Accept value {accept}, "
348348
f"supported values are {[mime_json, mime_msgpack, mime_zlib]}",
349349
)
350-
# Create log directory if it doesn't exist
350+
351+
# result_dir is guaranteed to exist on startup
351352
log_dir, _, _ = settings.get_result_dir()
352-
os.makedirs(log_dir, exist_ok=True)
353353
log_fname = "log_" + id
354354
log_file = os.path.join(log_dir, log_fname)
355355
logging.info(f"Extracting logs from {log_file}")

0 commit comments

Comments
 (0)