

def onerror(function, path, excinfo):
    'Error handler for `shutil.rmtree`.\n\n    If the error is due to an access error (read-only file), it\n    attempts to add write permission and then retries.\n    If the error is for another reason, it re-raises the error.\n\n    Usage: `shutil.rmtree(path, onerror=onerror)'
    if (not os.access(path, os.W_OK)):
        os.chmod(path, stat.S_IWUSR)
        function(excinfo)
    else:
        raise

dataset/ETHPy150Open winpython/winpython/winpython/utils.py onerror/VarMisuse@46/167 `path`->`excinfo`