]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (GH-31548...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Mar 2022 20:52:07 +0000 (13:52 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Mar 2022 20:52:07 +0000 (13:52 -0700)
(cherry picked from commit 879fbd9472753149b627f32add3ddca90ac47ab7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
Doc/library/os.rst

index d70f403e8cf1f3acd9a50af3d901199989ddabf8..2f7b37019e4a437238645d5c92dc3adef30f0e69 100644 (file)
@@ -1909,7 +1909,8 @@ features:
 
    Create a directory named *path* with numeric mode *mode*.
 
-   If the directory already exists, :exc:`FileExistsError` is raised.
+   If the directory already exists, :exc:`FileExistsError` is raised. If a parent
+   directory in the path does not exist, :exc:`FileNotFoundError` is raised.
 
    .. _mkdir_modebits: