[telepathy-python/master] Raise InvalidArgument if InitiatorHandle, InitiatorID or Requested is in a channel request.

Jonny Lamb jonny.lamb at collabora.co.uk
Thu Jul 16 01:49:37 PDT 2009


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

diff --git a/src/server/conn.py b/src/server/conn.py
index 24eecef..0e9a25e 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -425,8 +425,10 @@ class ConnectionInterfaceRequests(
         check_valid_type_if_exists('TargetID',
             lambda p: isinstance(p, dbus.String))
 
-        # TODO: When Initiatorhandle, InitiatorID and Requested are officially
-        # supporter, if the request has any of them, raise an error.
+        # Disallow InitiatorHandle, InitiatorID and Requested.
+        check_valid_type_if_exists('InitiatorHandle', lambda p: False)
+        check_valid_type_if_exists('InitiatorID', lambda p: False)
+        check_valid_type_if_exists('Requested', lambda p: False)
 
         type = props[CHANNEL_INTERFACE + '.ChannelType']
         handle_type = props.get(CHANNEL_INTERFACE + '.TargetHandleType',
-- 
1.5.6.5




More information about the telepathy-commits mailing list