def rmtree_errorhandler(func, path, exc_info):
 if (os.stat(path).st_mode & stat.S_IREAD):
  os.chmod(path, stat.S_IWRITE)
  func(path)
  return
 else:
  raise

def rmtree_errorhandler ( func , path , exc_info ) : if ( os . stat ( path ) . st_mode & stat . S_IREAD ) : os . chmod ( path , stat . S_IWRITE ) func ( path ) return else : raise
on windows .