@@ -1555,18 +1555,21 @@ features:
15551555 single: UNC paths; and os.makedirs()
15561556
15571557 Recursive directory creation function. Like :func: `mkdir `, but makes all
1558- intermediate-level directories needed to contain the leaf directory. If
1559- the target directory with the same mode as specified already exists,
1560- raises an :exc: `OSError ` exception if *exist_ok * is False, otherwise no
1561- exception is raised. If the directory cannot be created in other cases,
1562- raises an :exc: `OSError ` exception. The default *mode * is ``0o777 `` (octal).
1563- On some systems, *mode * is ignored. Where it is used, the current umask
1564- value is first masked out.
1558+ intermediate-level directories needed to contain the leaf directory.
1559+
1560+ The default *mode * is ``0o777 `` (octal). On some systems, *mode * is
1561+ ignored. Where it is used, the current umask value is first masked out.
1562+
1563+ If *exists_ok * is ``False `` (the default), an :exc: `OSError ` is raised if
1564+ the target directory already exists. If *exists_ok * is ``True `` an
1565+ :exc: `OSError ` is still raised if the umask-masked *mode * is different from
1566+ the existing mode, on systems where the mode is used. :exc: `OSError ` will
1567+ also be raised if the directory creation fails.
15651568
15661569 .. note ::
15671570
15681571 :func: `makedirs ` will become confused if the path elements to create
1569- include :data: `pardir `.
1572+ include :data: `pardir ` (eg. ".." on UNIX systems) .
15701573
15711574 This function handles UNC paths correctly.
15721575
0 commit comments