Skip to content

Commit

Permalink
Fixed rare race condition error when creating the basetemp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jun 29, 2019
1 parent d4a76a0 commit 9136b3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/5524.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed rare race condition error when creating the ``basetemp`` directory.
2 changes: 1 addition & 1 deletion src/_pytest/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def ensure_reset_dir(path):
"""
if path.exists():
rmtree(path, force=True)
path.mkdir()
path.mkdir(exist_ok=True)


def rmtree(path, force=False):
Expand Down

0 comments on commit 9136b3f

Please sign in to comment.