Skip to content

Commit 7d482a0

Browse files
authored
Merge pull request #1395 from vondravl/fix/create-directory-race-condition
fix: use exist_ok=True in create_directory to prevent race condition
2 parents a5904f7 + eb6d27a commit 7d482a0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/gooddata-sdk/src/gooddata_sdk

packages/gooddata-sdk/src/gooddata_sdk/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ def get_sorted_yaml_files(folder: Path) -> list[Path]:
166166

167167

168168
def create_directory(path: Path) -> None:
169-
if not os.path.exists(path):
170-
os.makedirs(path)
169+
os.makedirs(path, exist_ok=True)
171170

172171

173172
def recreate_directory(path: Path) -> None:

0 commit comments

Comments
 (0)