diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/shutil.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index eb81c7d..3ed1d05 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -433,12 +433,12 @@ will propagate. :: import os, stat import shutil - + def remove_readonly(func, path, _): "Clear the readonly bit and reattempt the removal" os.chmod(path, stat.S_IWRITE) - func(path) - + func(path) + shutil.rmtree(directory, onerror=remove_readonly) .. _archiving-operations: |