parameters: (self, package, ignore_list)
docstring: Delete application profile on device.
  
      Args:
        package: The full package name string of the application for which the
          profile is to be deleted.
        ignore_list: List of files to keep.
docstring_summary: Delete application profile on device.
docstring_tokens: Delete application profile on device .
function: def RemoveProfile(self, package, ignore_list):
      """Delete application profile on device.
  
      Args:
        package: The full package name string of the application for which the
          profile is to be deleted.
        ignore_list: List of files to keep.
      """
      profile_dir = self._GetProfileDir(package)
      if not self._device.PathExists(profile_dir):
        return
      files = [
        posixpath.join(profile_dir, f)
        for f in self._device.ListDirectory(profile_dir, as_root=True)
        if f not in ignore_list]
      if not files:
        return
      cmd = ['rm', '-r']
      cmd.extend(files)
      self._device.RunShellCommand(cmd, as_root=True, check_return=True)
function_tokens: def RemoveProfile ( self , package , ignore_list ) : profile_dir = self . _GetProfileDir ( package ) if not self . _device . PathExists ( profile_dir ) : return files = [ posixpath . join ( profile_dir , f ) for f in self . _device . ListDirectory ( profile_dir , as_root = True ) if f not in ignore_list ] if not files : return cmd = [ 'rm' , '-r' ] cmd . extend ( files ) self . _device . RunShellCommand ( cmd , as_root = True , check_return = True )