Skip to content

Commit bb0a081

Browse files
committed
Fix potential error in creating log directory
1 parent b731653 commit bb0a081

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

common/logging.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def configure_logging():
4747
"""Sets up the logging infrastructure: all needed directories & files, handlers, loggers, etc."""
4848

4949
# Make sure our logfile directory exists
50-
if not os.path.exists(LOGGING_BASE_DIR):
51-
os.mkdir(LOGGING_BASE_DIR)
50+
os.makedirs(LOGGING_BASE_DIR, exist_ok=True)
5251

5352
# extend the basic config with each package's custom, but very similar configuration.
5453
config = copy.deepcopy(BASE_CONFIG)

0 commit comments

Comments
 (0)