def addobj(self, cls, *clsargs, **clskwds):
        obj = cls(self, *clsargs, **clskwds)
        self._objslock.acquire()
        if obj.objid in self._objs:
            self._objslock.release()
            obj.shutdown()
            raise KeyError, "non-unique object id %s for %s" % (obj.objid, obj)
        self._objs[obj.objid] = obj
        self._objslock.release()
        return obj
Add an emulation object.
dataset/ETHPy150Open coreemu/core/daemon/core/session.py/Session.addobj