Skip to content

Commit 897fb88

Browse files
kubikovladak
authored andcommitted
tools: utils: do not error during directory creation if it exists
Do not error out when creating a directory and directory already exists. Signed-off-by: Ondrej Kubik <[email protected]>
1 parent caa39c4 commit 897fb88

File tree

1 file changed

+1
-1
lines changed
  • tools/src/main/python/opengrok_tools/utils

1 file changed

+1
-1
lines changed

tools/src/main/python/opengrok_tools/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def check_create_dir(logger, path):
4343
"""
4444
if not os.path.isdir(path):
4545
try:
46-
os.makedirs(path)
46+
os.makedirs(path, exist_ok=True)
4747
except OSError:
4848
logger.error("cannot create {} directory".format(path))
4949
sys.exit(FAILURE_EXITVAL)

0 commit comments

Comments
 (0)