[telepathy-python/master] Call get_handle_type() in ListChannel.

Olivier Le Thanh Duong olivier at lethanh.be
Wed Jun 17 08:01:16 PDT 2009


In ListChannels method get the handle type from the channel function
get_handle_type() instead of asking directly the handle since that
doesn't work if the handle is null.
---
 NEWS               |    2 ++
 src/server/conn.py |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index e27cfce..103354b 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ Enhancements:
 
 Fixes:
 
+ * Call get_handle_type() in ListChannels avoiding an error if the handle is null.
+
 telepathy-python 0.15.8 (2009-06-15)
 ====================================
 
diff --git a/src/server/conn.py b/src/server/conn.py
index 031e2db..50cf574 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -281,7 +281,7 @@ class Connection(_Connection, DBusProperties):
         self.check_connected()
         ret = []
         for channel in self._channels:
-            chan = (channel._object_path, channel._type, channel._handle.get_type(), channel._handle)
+            chan = (channel._object_path, channel._type, channel._get_handle_type(), channel._handle)
             ret.append(chan)
         return ret
 
-- 
1.5.6.5



More information about the telepathy-commits mailing list