]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shuti...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 30 Oct 2024 20:14:27 +0000 (21:14 +0100)
committerGitHub <noreply@github.com>
Wed, 30 Oct 2024 20:14:27 +0000 (13:14 -0700)
gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067)

* gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm.

Resolves GH-126055

* gh-126055:  Fix omitted code highlighting
(cherry picked from commit 597d814334742dde386a4d2979b9418aee6fcaba)

Co-authored-by: Victor Wheeler <vwheeler63@users.noreply.github.com>
Doc/library/os.rst

index 3a5deaa1d692bd3fbae49a3c941f27f6ae81e812..423480e927c900b0625e5db1954beb490245fc7b 100644 (file)
@@ -3571,6 +3571,7 @@ features:
               os.remove(os.path.join(root, name))
           for name in dirs:
               os.rmdir(os.path.join(root, name))
+      os.rmdir(top)
 
    .. audit-event:: os.walk top,topdown,onerror,followlinks os.walk