diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-27 16:04:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-27 16:04:10 +0000 |
commit | a971f38b11f5955f6ea4f7922233d8324a5c6753 (patch) | |
tree | 5a424740e9cee97bc1c8053fea07db935c27b659 /pre_commit/util.py | |
parent | Adding upstream version 2.8.2. (diff) | |
download | pre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.tar.xz pre-commit-a971f38b11f5955f6ea4f7922233d8324a5c6753.zip |
Adding upstream version 2.9.3.upstream/2.9.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/util.py')
-rw-r--r-- | pre_commit/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pre_commit/util.py b/pre_commit/util.py index f4cf704..b5f40ad 100644 --- a/pre_commit/util.py +++ b/pre_commit/util.py @@ -255,7 +255,7 @@ def rmtree(path: str) -> None: excvalue = exc[1] if ( func in (os.rmdir, os.remove, os.unlink) and - excvalue.errno == errno.EACCES + excvalue.errno in {errno.EACCES, errno.EPERM} ): for p in (path, os.path.dirname(path)): os.chmod(p, os.stat(p).st_mode | stat.S_IWUSR) |