Skip to content

Commit a62a369

Browse files
oestebaneffigies
andcommitted
Update nipype/utils/filemanip.py [skip ci]
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
1 parent 8bfef03 commit a62a369

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/utils/filemanip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def _write_text(self, text):
8080
Path.write_text = _write_text
8181

8282
try:
83-
(Path(gettempdir()) / 'exist_ok_test').mkdir(exist_ok=True)
83+
with tempfile.TemporaryDirectory() as tmpdir:
84+
(Path(tmpdir) / 'exist_ok_test').mkdir(exist_ok=True)
8485
except TypeError:
8586
def _mkdir(self, mode=0o777, parents=False, exist_ok=False):
8687
if not exist_ok and self.exists():

0 commit comments

Comments
 (0)