From: Ronald Oussoren Date: Fri, 2 Jan 2009 15:00:05 +0000 (+0000) Subject: Fix for issue 1149804 X-Git-Tag: v2.7a1~2425 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abcc168c69868c447dc976841ce1978f2298d4a0;p=thirdparty%2FPython%2Fcpython.git Fix for issue 1149804 --- diff --git a/Lib/plat-mac/macostools.py b/Lib/plat-mac/macostools.py index d7724fa271b5..337cc7f1f1d4 100644 --- a/Lib/plat-mac/macostools.py +++ b/Lib/plat-mac/macostools.py @@ -62,7 +62,14 @@ def mkdirs(dst): if os.sep == ':' and not ':' in head: head = head + ':' mkdirs(head) - os.mkdir(dst, 0777) + + try: + os.mkdir(dst, 0777) + except OSError, e: + # be happy if someone already created the path + if e.errno != errno.EEXIST: + raise + def touched(dst): """Tell the finder a file has changed. No-op on MacOSX.""" diff --git a/Misc/NEWS b/Misc/NEWS index 03cc72713faa..040ed5c3b3b6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -235,6 +235,9 @@ Library - Issue #1737832 : plat-mac/EasyDialog.py no longer uses the broken aepack module. +- Issue #1149804: macostools.mkdirs now even works when another process + creates one of the needed subdirectories. + Tools/Demos -----------