Shofel2_T124_python/venv/lib/python3.10/site-packages/setuptools/py312compat.py

13 lines
330 B
Python
Raw Normal View History

2024-05-25 16:45:07 +00:00
import sys
import shutil
def shutil_rmtree(path, ignore_errors=False, onexc=None):
if sys.version_info >= (3, 12):
return shutil.rmtree(path, ignore_errors, onexc=onexc)
def _handler(fn, path, excinfo):
return onexc(fn, path, excinfo[1])
return shutil.rmtree(path, ignore_errors, onerror=_handler)