[Telepathy-commits] [telepathy-python/master] Fix TargetHandle{, Type} properties by returning the correct signature.

Jonny Lamb jonny.lamb at collabora.co.uk
Mon Jan 5 04:09:13 PST 2009


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/server/channel.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/server/channel.py b/src/server/channel.py
index 6e29599..56a2de8 100644
--- a/src/server/channel.py
+++ b/src/server/channel.py
@@ -64,8 +64,14 @@ class Channel(_Channel, DBusProperties):
         self._implement_property_get(CHANNEL_INTERFACE,
             {'ChannelType': lambda: dbus.String(self.GetChannelType()),
              'Interfaces': lambda: dbus.Array(self.GetInterfaces(), signature='s'),
-             'TargetHandle': lambda: dbus.UInt32(self.GetHandle()),
-             'TargetHandleType': lambda: dbus.UInt32(self._handle.get_type())})
+             'TargetHandle': lambda: dbus.UInt32(self._handle),
+             'TargetHandleType': lambda: dbus.UInt32(self._get_handle_type())})
+
+    def _get_handle_type(self):
+        if self._handle:
+            return self._handle.get_type()
+        else:
+            return CONNECTION_HANDLE_TYPE_NONE
 
     @dbus.service.method(CHANNEL_INTERFACE, in_signature='', out_signature='')
     def Close(self):
-- 
1.5.6.5




More information about the Telepathy-commits mailing list