Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit ab52bb7

Browse files
committed
adjust onerror callback signature
1 parent e6ad4c8 commit ab52bb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setuptools_golang.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ def rmtree(path: str) -> None:
2828
def handle_remove_readonly(
2929
func: Callable[..., Any],
3030
path: str,
31-
exc: tuple[type[OSError], OSError, TracebackType],
31+
exc: tuple[type[BaseException], BaseException, TracebackType],
3232
) -> None:
3333
excvalue = exc[1]
3434
if (
35+
isinstance(excvalue, OSError) and
3536
func in (os.rmdir, os.remove, os.unlink) and
3637
excvalue.errno == errno.EACCES
3738
):

0 commit comments

Comments
 (0)