[telepathy-python/master] Remove mutable properties from the CreateChannel method reply.
Jonny Lamb
jonny.lamb at collabora.co.uk
Thu Jul 16 01:49:32 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/server/conn.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/server/conn.py b/src/server/conn.py
index 3790a59..e1f318e 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -485,7 +485,19 @@ class ConnectionInterfaceRequests(
channel = self._channel_manager.channel_for_props(props, signal=False)
- # TODO: This shouldn't return properties that can change.
+ # Remove mutable properties
+ todel = []
+ for prop in props:
+ iface, name = prop.rsplit('.', 1) # a bit of a hack
+ if name in channel._immutable_properties:
+ if channel._immutable_properties[name] != iface:
+ todel.append(prop)
+ else:
+ todel.append(prop)
+
+ for p in todel:
+ del props[p]
+
_success(channel._object_path, props)
# CreateChannel MUST return *before* NewChannels is emitted.
--
1.5.6.5
More information about the telepathy-commits
mailing list