Ejemplo n.º 1
0
 def on_exit(self, sender, final):
     if sender is self.interpreter:
         self.is_finished = True
         for timer in self.compiler.timer_mapping.values():
             eventlet.greenthread.cancel(timer)
             del timer
         dispatcher.disconnect(self, "signal_exit", self.interpreter)
         dispatcher.send("signal_exit", self, final=final)
Ejemplo n.º 2
0
 def on_exit(self, sender, final):
     if sender is self.interpreter:
         self.is_finished = True
         for timer in self.compiler.timer_mapping.values():
             eventlet.greenthread.cancel(timer)
             del timer
         dispatcher.disconnect(self, "signal_exit", self.interpreter)
         dispatcher.send("signal_exit", self, final=final)
Ejemplo n.º 3
0
def disconnect(handler, signal, sender=dispatcher.Any):
    """
    Disconnect a previously connected handler form the specified signal, optionally, only
    for the specified sender.

    Parameters:

        :handler: The callback to be disconnected.
        :signal: The signal the handler is to be disconnected form. It will
                 be an :class:`wlauto.core.signal.Signal` instance.
        :sender: If specified, the handler will only be disconnected from the signal
                sent by this sender.

    """
    dispatcher.disconnect(handler, signal, sender)
Ejemplo n.º 4
0
def disconnect(handler, signal, sender=dispatcher.Any):
    """
    Disconnect a previously connected handler form the specified signal, optionally, only
    for the specified sender.

    Parameters:

        :handler: The callback to be disconnected.
        :signal: The signal the handler is to be disconnected form. It will
                 be an :class:`wlauto.core.signal.Signal` instance.
        :sender: If specified, the handler will only be disconnected from the signal
                sent by this sender.

    """
    dispatcher.disconnect(handler, signal, sender)
Ejemplo n.º 5
0
 def _disconnect_louie_node_and_value(self):
     #pass
     dispatcher.disconnect(self._louie_group, ZWaveNetwork.SIGNAL_GROUP)
     dispatcher.disconnect(self._louie_node_update,
                           ZWaveNetwork.SIGNAL_NODE)
     dispatcher.disconnect(self._louie_value_update,
                           ZWaveNetwork.SIGNAL_VALUE)
     dispatcher.disconnect(self._louie_ctrl_message,
                           ZWaveController.SIGNAL_CONTROLLER)
Ejemplo n.º 6
0
def disconnect(sender, signal, callback):
    try:
        dispatcher.disconnect(callback, signal, sender)
    except Exception:
        pass
Ejemplo n.º 7
0
 def _disconnect_louie_node_and_value(self):
     #pass
     dispatcher.disconnect(self._louie_group, ZWaveNetwork.SIGNAL_GROUP)
     dispatcher.disconnect(self._louie_node_update, ZWaveNetwork.SIGNAL_NODE)
     dispatcher.disconnect(self._louie_value_update, ZWaveNetwork.SIGNAL_VALUE)
     dispatcher.disconnect(self._louie_ctrl_message, ZWaveController.SIGNAL_CONTROLLER)
Ejemplo n.º 8
0
def remove_dispatcher_listen(func, notif):
    dispatcher.disconnect(func, notif)
Ejemplo n.º 9
0
def remove_dispatcher_listen(func,notif):
	dispatcher.disconnect(func, notif)