Files
zenml/venv/lib/python3.9/site-packages/setuptools/compat/py311.py
Christian Mantha 2ca0b9ef7c star
2026-03-02 19:10:52 -05:00

13 lines
330 B
Python

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)