From: Ed Page Date: Mon, 8 Nov 2010 23:51:59 +0000 (-0600) Subject: Applying feedback on the update scripts X-Git-Url: http://vcs.maemo.org/git/?p=theonering;a=commitdiff_plain;h=a151f4c07f375b0c39f36685489591386e9ef6ca Applying feedback on the update scripts --- diff --git a/src/gvoice/state_machine.py b/src/gvoice/state_machine.py index c4a2382..724cdc2 100644 --- a/src/gvoice/state_machine.py +++ b/src/gvoice/state_machine.py @@ -301,7 +301,7 @@ class UpdateStateMachine(StateMachine): return # not started yet _moduleLogger.info("%s Forcing immediate update of state machine" % (self._name, )) self._onTimeout.cancel() - self._strategy.initialize_state() + self._strategy.reinitialize_state() self._strategy.increment_state() nextTimeout = self._strategy.timeout if nextTimeout != self.INFINITE_PERIOD and nextTimeout < self._maxTime: diff --git a/src/tp_send_debug.py b/src/tp_send_debug.py index 2db0a13..b5d5a7e 100755 --- a/src/tp_send_debug.py +++ b/src/tp_send_debug.py @@ -110,13 +110,21 @@ def _on_ensure(acct, conn, message, yours, channelObjectPath, properties): channel[telepathy.server.CHANNEL_TYPE_TEXT].Send( telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, message, - reply_handler = lambda: _on_send(acct, conn, channel), + reply_handler = lambda: _on_send(channel), error_handler = _on_error, ) -def _on_send(acct, conn, channel): +def _on_send(channel): print "Message sent" + channel[telepathy.server.CHANNEL].Close( + reply_handler = _on_channel_closed, + error_handler = _on_error, + ) + + +def _on_channel_closed(): + print "Channel Closed" loop.quit()