[Python-checkins] cpython (3.5): FileExistsError is raised by mkdir when dir exists

zach.ware python-checkins at python.org
Mon Apr 25 10:28:46 EDT 2016


https://hg.python.org/cpython/rev/2c1651fbfbba
changeset:   101138:2c1651fbfbba
branch:      3.5
parent:      101136:1fdaa71d47f5
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Mon Apr 25 09:27:27 2016 -0500
summary:
  FileExistsError is raised by mkdir when dir exists

Reported by Saul Spatz on docs@

files:
  Doc/library/os.rst |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1624,8 +1624,8 @@
    Create a directory named *path* with numeric mode *mode*.
 
    On some systems, *mode* is ignored.  Where it is used, the current umask
-   value is first masked out.  If the directory already exists, :exc:`OSError`
-   is raised.
+   value is first masked out.  If the directory already exists,
+   :exc:`FileExistsError` is raised.
 
    This function can also support :ref:`paths relative to directory descriptors
    <dir_fd>`.

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list