import sys
+from errno import ENOENT, ENOTDIR, EEXIST
+
_names = sys.builtin_module_names
# Note: more names are added to __all__ later.
if not tail:
head, tail = path.split(head)
if head and tail and not path.exists(head):
- makedirs(head, mode)
+ try:
+ makedirs(head, mode)
+ except OSError, e:
+ # be happy if someone already created the path
+ if e.errno != EEXIST:
+ raise
if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists
return
mkdir(name, mode)
__all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
def _execvpe(file, args, env=None):
- from errno import ENOENT, ENOTDIR
-
if env is not None:
func = execve
argrest = (args, env)
Library
-------
+- Patch #1608267: fix a race condition in os.makedirs() is the directory
+ to be created is already there.
+
- Patch #1610437: fix a tarfile bug with long filename headers.
- Patch #1371075: Make ConfigParser accept optional dict type