Skip to content

Commit f022435

Browse files
committed
use exist_ok instead of explicit check for path exists when creating hash cache so it is multiprocess safe
1 parent 811dc45 commit f022435

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pydra/utils/hash.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def location_converter(path: ty.Union[Path, str, None]) -> Path:
6060
if path is None:
6161
path = PersistentCache.location_default()
6262
path = Path(path)
63-
if not path.exists():
64-
path.mkdir(parents=True)
63+
path.mkdir(parents=True, exist_ok=True)
6564
return path
6665

6766

0 commit comments

Comments
 (0)