Commit 9370857b authored by Anael Beutot's avatar Anael Beutot
Browse files

Removed register callbacks method on EventLoop.

parent 4cd40e00
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ class Hypervisor(object):

        logger.debug('Domains: %s', self.domains)

        self.vir_event_loop.register_callbacks(self.vir_cb)
        self.vir_con.domainEventRegister(self.vir_cb, None)  # TODO find out args

    def stop(self):
        self.vir_event_loop.stop()
+0 −10
Original line number Diff line number Diff line
@@ -240,16 +240,6 @@ class EventLoop(object):
            t.stop()
            # logger.debug('Remove timer %d', timer_id)

    def register_callbacks(self, *callbacks):
        """Register a callback."""
        global connection

        for c in callbacks:
            try:
                connection.domainEventRegister(c, None)  # TODO find out args
            except:
                logger.exception('Can\'t register callback')

    def stop(self):
        for handl in chain(self.handles.itervalues(), self.timers.itervalues()):
            handl.stop()