diff options
author | Robert McQueen <robot101@debian.org> | 2005-10-29 19:13:17 +0000 |
---|---|---|
committer | Robert McQueen <robot101@debian.org> | 2005-10-29 19:13:17 +0000 |
commit | 20bcbaf21f4e94c48d6348a4ba8013d20f9e4d36 (patch) | |
tree | cf690b655da24bcd25d678bdd178d42064934258 /python/proxies.py | |
parent | 2d74492ba2c61a41d9d22a8872806a8184acef16 (diff) |
2005-10-29 Robert McQueen <robot101@debian.org>
* python/decorators.py: Add optional arguments to the method and
signal decorators to allow you to specify the signature of arguments
and return values. Preserve the doc strings of signal functions in the
decorated version, for pydoc and friends.
* python/dbus_bindings.pyx, python/proxies.py: Replace the
parse_signature_block function with an iterable dbus.Signature()
type. Fix a bug in MessageIter.append_strict where you could append
anything by claiming it was a string.
* python/service.py: Use the out_signature decoration on methods to
marshal return values, meaning you no longer require dbus.Array()
or dbus.Dictionary() to indicate the type when returning empty
arrays or dictionaries. Fix a bug where exceptions which are defined
in __main__ are not turned into error replies.
* test/python/test-client.py, test/python/test-service.py: Add test
for correct marshalling of return values according to out_signature.
Fix a bug in the async call test where the error_handler is missing a
self argument.
Diffstat (limited to 'python/proxies.py')
-rw-r--r-- | python/proxies.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/python/proxies.py b/python/proxies.py index efa2b501..f1f33941 100644 --- a/python/proxies.py +++ b/python/proxies.py @@ -62,14 +62,13 @@ class ProxyMethod: # Add the arguments to the function iter = message.get_iter(True) - remainder = self._introspect_sig - for arg in args: - if self._introspect_sig: - (sig, remainder) = iter.parse_signature_block(remainder) + if self._introspect_sig: + for (arg, sig) in zip(args, dbus_bindings.Signature(self._introspect_sig)): iter.append_strict(arg, sig) - else: + else: + for arg in args: iter.append(arg) - + if ignore_reply: result = self._connection.send(message) args_tuple = (result,) |