[telepathy-ashes/master] work-around b.fd.o 25116 butterfly omits TargetID in CreateChannel response
David Laban
david.laban at collabora.co.uk
Mon Nov 30 08:12:33 PST 2009
---
ashes/tools/commands.py | 2 ++
ashes/tools/dispatchers.py | 4 +++-
ashes/tools/groups.py | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ashes/tools/commands.py b/ashes/tools/commands.py
index a4f70c8..3e9b055 100644
--- a/ashes/tools/commands.py
+++ b/ashes/tools/commands.py
@@ -200,6 +200,8 @@ class CommandExecutor(TextChannelEchoer):
'org.freedesktop.Telepathy.Channel.Type.StreamedMedia.FUTURE.InitialVideo':
want_video,
}
+ targetid_prop = 'org.freedesktop.Telepathy.Channel.TargetID'
+ #request[targetid_prop] = self.properties[targetid_prop]
self.connection.create_channel(request, handler_class)
diff --git a/ashes/tools/dispatchers.py b/ashes/tools/dispatchers.py
index 50f4739..42bf048 100644
--- a/ashes/tools/dispatchers.py
+++ b/ashes/tools/dispatchers.py
@@ -135,11 +135,13 @@ class ChannelDispatcher(ConnectionListener):
Gets called for each channel in a NewChannels signal.
The channel is guaranteed to be "ready" at this point.
"""
+ for k,v in properties.items():
+ print str(k), '\t:', str(v)
channel_type = properties['org.freedesktop.Telepathy.Channel.ChannelType']
handle_type = properties['org.freedesktop.Telepathy.Channel.TargetHandleType']
handle = properties['org.freedesktop.Telepathy.Channel.TargetHandle']
requested = properties['org.freedesktop.Telepathy.Channel.Requested']
- id = properties['org.freedesktop.Telepathy.Channel.TargetID']
+ id = properties.get('org.freedesktop.Telepathy.Channel.TargetID', '')
# FIXME. This optimisation is probably not very general.
# Don't be putting it in any libraries.
contact_regexp = self.config.get("contact_regexp", ".*")
diff --git a/ashes/tools/groups.py b/ashes/tools/groups.py
index e252ca5..cfde9c0 100644
--- a/ashes/tools/groups.py
+++ b/ashes/tools/groups.py
@@ -18,7 +18,7 @@ class MemberAcceptor(ChannelListener):
handle_type = properties['org.freedesktop.Telepathy.Channel.TargetHandleType']
handle = properties['org.freedesktop.Telepathy.Channel.TargetHandle']
requested = properties['org.freedesktop.Telepathy.Channel.Requested']
- self.id = properties['org.freedesktop.Telepathy.Channel.TargetID']
+ self.id = properties.get('org.freedesktop.Telepathy.Channel.TargetID', '')
print 'List Handled:', self.id
sys.stdout.flush()
get_all_properties(channel,
--
1.5.6.5
More information about the telepathy-commits
mailing list