diff options
author | Robert McQueen <robot101@debian.org> | 2005-11-27 16:40:57 +0000 |
---|---|---|
committer | Robert McQueen <robot101@debian.org> | 2005-11-27 16:40:57 +0000 |
commit | c77c7e343b73bb9c14319679063a55e5cf1ee1d6 (patch) | |
tree | 4db3c1b4c48d49bdb528560072cbbaa5004b22d6 /python/dbus_bindings.pyx | |
parent | caecde624d877cc09fd69f0cb27e39ace6524b9b (diff) |
2005-11-27 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Fix a bug where doing a strict append
with type v of an instance of dbus.Variant(foo, type='x') caused
it to be boxed twice before sending over the bus.
* python/dbus_bindings.pyx, python/service.py,
test/python/test-client.py: Update the constants for the new
request_name flags, and update comments/test cases now that queueing
is the default action.
Diffstat (limited to 'python/dbus_bindings.pyx')
-rw-r--r-- | python/dbus_bindings.pyx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/dbus_bindings.pyx b/python/dbus_bindings.pyx index 8b1b221b..21adc87a 100644 --- a/python/dbus_bindings.pyx +++ b/python/dbus_bindings.pyx @@ -1053,7 +1053,10 @@ cdef class MessageIter: tmp_sig = sig[1:-1] retval = self.append_struct(value, signature = tmp_sig) elif sig_type == TYPE_VARIANT: - retval = self.append_variant(Variant(value)) + if isinstance(value, Variant): + retval = self.append_variant(value) + else: + retval = self.append_variant(Variant(value)) elif sig_type == DICT_ENTRY_BEGIN: raise TypeError, "Signiture is invalid in append_strict. A dict entry must be part of an array." else: @@ -1748,8 +1751,9 @@ def bus_register(Connection connection): return retval -NAME_FLAG_PROHIBIT_REPLACEMENT = 0x1 +NAME_FLAG_ALLOW_REPLACEMENT = 0x1 NAME_FLAG_REPLACE_EXISTING = 0x2 +NAME_FLAG_DO_NOT_QUEUE = 0x4 REQUEST_NAME_REPLY_PRIMARY_OWNER = 1 REQUEST_NAME_REPLY_IN_QUEUE = 2 |