chrome/test/chromedriver/util.py
def _DeleteDir(path):
  """Deletes a directory recursively, which must exist.

  Note that this function can fail and raise OSError if another process is
  making changes to the directory at the same time.
  """
  # Don't use shutil.rmtree because it can't delete read-only files on Win.
  for root, dirs, files in os.walk(path, topdown=False):
    for name in files:
      filename = os.path.join(root, name)
      try:
        os.chmod(filename, stat.S_IWRITE)
      except OSError:
        pass
      os.remove(filename)
    for name in dirs:
      os.rmdir(os.path.join(root, name))
  os.rmdir(path)
Deletes a directory recursively, which must exist.

  Note that this function can fail and raise OSError if another process is
  making changes to the directory at the same time.
  
Deletes a directory recursively, which must exist.
Note that this function can fail and raise OSError if another process is
making changes to the directory at the same time.
Deletes a directory recursively which must exist . Note that this function can fail and raise OSError if another process is making changes to the directory at the same time .
def _DeleteDir(path):
  for root, dirs, files in os.walk(path, topdown=False):
    for name in files:
      filename = os.path.join(root, name)
      try:
        os.chmod(filename, stat.S_IWRITE)
      except OSError:
        pass
      os.remove(filename)
    for name in dirs:
      os.rmdir(os.path.join(root, name))
  os.rmdir(path)
def _DeleteDir ( path ) : for root , dirs , files in os . walk ( path , topdown = False ) : for name in files : filename = os . path . join ( root , name ) try : os . chmod ( filename , stat . S_IWRITE ) except OSError : pass os . remove ( filename ) for name in dirs : os . rmdir ( os . path . join ( root , name ) ) os . rmdir ( path )
Deletes a directory recursively, which must exist.
Deletes a directory recursively which must exist .
"""Deletes a directory recursively, which must exist.

  Note that this function can fail and raise OSError if another process is
  making changes to the directory at the same time.
  """ # Don't use shutil.rmtree because it can't delete read-only files on Win.
path