From: Georg Brandl Date: Sat, 12 Jun 2010 06:28:58 +0000 (+0000) Subject: Document that an existing directory raises in mkdir(). X-Git-Tag: v2.7rc2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab776cef9d660e05cecd2e5183635c749af92a6e;p=python Document that an existing directory raises in mkdir(). --- diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 64e04bed78..959c18cd81 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1175,7 +1175,8 @@ Files and Directories Create a directory named *path* with numeric mode *mode*. The default *mode* is ``0777`` (octal). On some systems, *mode* is ignored. Where it is used, the - current umask value is first masked out. + current umask value is first masked out. If the directory already exists, + :exc:`OSError` is raised. It is also possible to create temporary directories; see the :mod:`tempfile` module's :func:`tempfile.mkdtemp` function.