Remove a target

        Raises a ``RuntimeError`` if the target does not exist.
322510
def remove(self):
        
        session = client.get_client().create_session()

        if not self._base_query(session).count() > 0:
            session.close()
            raise RuntimeError("Target does not exist, name={:s}, params={:s}"
                               "".format(self.name, self.params))

        # remove the target from the database
        self._base_query(session).delete()
        session.commit()

        session.close()
651366
public function remove()
    {
        if ($this->removed) {
            return;
        }

        if (!\unlink($this->file)) {
            throw new RuntimeException(sprintf('Impossible to remove file "%s"', $this->file));
        }

        $this->removed = true;
    }
688459
def remove(self, value):
        
        # Raise TypeError if value is not hashable
        hash(value)

        result = self.redis.srem(self.key, self._pickle(value))
        if not result:
            raise KeyError(value)
813453
def remove(self, *args):
        '''
        
        '''
        return Plan(reduce(lambda m,k: m.remove(k), args, self.nodes))
1335964
def target_exists(self, target_id=0):
        
        try:
            target = self._target(target_id=target_id)
        except Exception as e:
            log.error("Exception checking if target exists: {} {}".format(type(e), e))
            return False
        return target is not None
1126225
def unregister(self, event):
        
        if self.running:
            raise RuntimeError("Can't unregister while running")
        self._handlers.pop(event, None)
1133602
def remove(path):
    '''
    
    '''
    try:
        os.remove(path)
    except OSError as exc:
        if exc.errno != errno.ENOENT:
            raise
738953
def remove(self, item):
        ''''''
        score = self._dict.pop(item, None)
        if score is not None:
            self._sl.remove(score)
            return score
976478
def remove(self, name, **params):
        
        log = self._getparam('log', self._discard, **params)

        if name not in self.names:
            log.error("Attempt to remove %r which was never added", name)
            raise Exception("Command %r has never been added" % (name,))
        del self.names[name]
        rebuild = False
        for path in list(self.modules):
            if name in self.modules[path]:
                self.modules[path].remove(name)
            if len(self.modules[path]) == 0:
                del self.modules[path]
                rebuild = True
        if rebuild:
            self._build(name, **params)
758854
def remove(self, attr, item):
        
        return self.set(attr, operation.Remove([item]))
1210910
def _remove(self, client_kwargs):
        
        with _handle_client_exception():
            # Object
            if 'obj' in client_kwargs:
                return self.client.delete_object(
                    client_kwargs['container'], client_kwargs['obj'])

            # Container
            return self.client.delete_container(client_kwargs['container'])
700942
def remove_from(self, target, ctx=None):
        

        annotations_key = Annotation.__ANNOTATIONS_KEY__

        try:
            # get local annotations
            local_annotations = get_local_property(
                target, annotations_key, ctx=ctx
            )
        except TypeError:
            raise TypeError('target {0} must be hashable'.format(target))

        # if local annotations exist
        if local_annotations is not None:
            # if target in self.targets
            if target in self.targets:
                # remove target from self.targets
                self.targets.remove(target)
                # and remove all self annotations from local_annotations
                while self in local_annotations:
                    local_annotations.remove(self)
                # if target is not annotated anymore, remove the empty list
                if not local_annotations:
                    del_properties(target, annotations_key)
1175311
public void removeTarget(T target) {
    Iterator<Pattern<T>> it = patterns.iterator();
    while (it.hasNext()) {
      Pattern<T> pattern = it.next();
      if (pattern.target().equals(target)) it.remove();
    }

    reverse.remove(target);
  }
1144788
def remove_child(self, child):
        
        try:
            self.children.remove(child)
        except ValueError as e:
            raise TreeError("child not found")
        else:
            child.up = None
            return child
1061761
def remove(action)
      raise ArgumentError.new('Expecting an action') unless action.is_a?(Action)
      @actions.delete(action)
      wakeup if running?
    end
1045134
def rename(self, target):
        
        if self._closed:
            self._raise_closed()
        self._accessor.rename(self, target)
503746
def remove(cls, resource_id, parent_id=None, grandparent_id=None,
               wait=True, timeout=None):
        """"""
        raise exception.NotSupported(feature="DELETE",
                                     context="VirtualSwitchManager")