parameters: (func, path, exc_info)
docstring: 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)``
docstring_summary: Error handler for ``shutil.rmtree``.
docstring_tokens: Error handler for shutil . rmtree .
function: def onerror(func, path, exc_info):
      """
      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)``
      """
      import stat
      if not os.access(path, os.W_OK):
          # Is the error an access error ?
          os.chmod(path, stat.S_IWUSR)
          func(path)
      else:
          raise
function_tokens: def onerror ( func , path , exc_info ) : import stat if not os . access ( path , os . W_OK ) : # Is the error an access error ? os . chmod ( path , stat . S_IWUSR ) func ( path ) else : raise