[Telepathy-commits] [telepathy-python/master] add client.conn.call_when_ready method

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Oct 20 09:29:08 PDT 2008


---
 src/client/conn.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/client/conn.py b/src/client/conn.py
index 94efcc3..a37a11d 100644
--- a/src/client/conn.py
+++ b/src/client/conn.py
@@ -98,3 +98,9 @@ class Connection(InterfaceFactory):
     def request_channel(self, type, handle_type, handle, suppress_handler):
         path = self.RequestChannel(type, handle_type, handle, suppress_handler)
         return Channel(self.service_name, path, self.bus)
+
+    def call_when_ready(self, handler):
+        if self._ready:
+            handler(self)
+        else:
+            self._ready_handlers.append(handler)
-- 
1.5.6.5



More information about the Telepathy-commits mailing list