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

If the error is due to an access error (read only file)
it attempts to add write permission and then retries.

If the error is for another reason it re-raises the error.

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