]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766)
authorZackery Spytz <zspytz@gmail.com>
Tue, 5 Dec 2023 17:09:39 +0000 (09:09 -0800)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 17:09:39 +0000 (19:09 +0200)
commit11d88a178b077e42025da538b890db3151a47070
tree7856bbd4fb4743d616645612694573c9d1304789
parentde6bca956432cc852a4a41e2a2cee9cdacd19f35
bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766)

* Ignore os.close() errors when ignore_errors is True.
* Pass os.close() errors to the error handler if specified.
* os.close no longer retried after error.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2020-12-14-09-31-13.bpo-35332.s22wAx.rst [new file with mode: 0644]