Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53de207

Browse files
committed
Fix race condition in paths.get_ipython_dirs(),
Directory may already exists. Use octomerge to get everyboy's contributions. Merge remote-tracking branches 'origin/pull/13256' and 'origin/pull/13263'
3 parents a3bcbdd + c94e49d + f9b36a4 commit 53de207

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

IPython/paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def get_ipython_dir() -> str:
7272
" using a temp directory.".format(parent))
7373
ipdir = tempfile.mkdtemp()
7474
else:
75-
os.makedirs(ipdir)
75+
os.makedirs(ipdir, exist_ok=True)
7676
assert isinstance(ipdir, str), "all path manipulation should be str(unicode), but are not."
7777
return ipdir
7878

0 commit comments

Comments
 (0)