Merging a change from tp-upstream and trying a fix for the General Error
authorEd Page <eopage@byu.net>
Fri, 5 Mar 2010 00:00:07 +0000 (18:00 -0600)
committerEd Page <eopage@byu.net>
Fri, 5 Mar 2010 00:00:07 +0000 (18:00 -0600)
src/tp/conn.py

index 57ddbbd..b761ce0 100644 (file)
@@ -129,7 +129,7 @@ class Connection(_Connection, DBusProperties):
                 if not isinstance(value, (int, long)):
                     raise InvalidArgument('incorrect type to %s parameter, got %s, expected an int' % (parm, type(value)))
             elif sig == 'b':
-                if not isinstance(value, (bool, dbus.types.Boolean)):
+                if not isinstance(value, (bool, dbus.Boolean)):
                     raise InvalidArgument('incorrect type to %s parameter, got %s, expected an boolean' % (parm, type(value)))
             else:
                 raise TypeError('unknown type signature %s in protocol parameters' % type)
@@ -521,20 +521,8 @@ class ConnectionInterfaceRequests(
 
         channel = self._channel_manager.create_channel_for_props(props, signal=False)
 
-        # 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)
+        returnedProps = channel.get_props()
+        _success(channel._object_path, returnedProps)
 
         # CreateChannel MUST return *before* NewChannels is emitted.
         self.signal_new_channels([channel])
@@ -551,7 +539,8 @@ class ConnectionInterfaceRequests(
 
         channel = self._channel_manager.channel_for_props(props, signal=False)
 
-        _success(yours, channel._object_path, props)
+        returnedProps = channel.get_props()
+        _success(yours, channel._object_path, returnedProps)
 
         self.signal_new_channels([channel])