Summary: | python-dbus: sending empty lists doesn't work | ||
---|---|---|---|
Product: | dbus | Reporter: | Lennart Poettering <mzsqb> |
Component: | core | Assignee: | Havoc Pennington <hp> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Lennart Poettering
2005-07-28 03:49:35 UTC
A related bug: if I try to send a dbus.Byte(0), I get nearly the same error. (Though dbus.UInt32(0) and friends work) I opened a new bug report for this dbus.Byte(0) issue, which even contains a patch: https://bugs.freedesktop.org/show_bug.cgi?id=4023 Alas the empty list issue remains. This should be in cvs shortly. To do this you can specify signitures or types: dbus.Array([], signiture="s") #empty array of strings dbus.Array([], signiture="(ii)") #empty array of a struct containing two int32's dbus.Array([], type=dbus.String) #empty array of strings dbus.Array([], type=dbus.Struct((dbus.Int32, dbus.Int32))) # not sure if this will work but it should - empty array of a struct containing two int32's Varients work the same way. Dictionaries are a bit different: dbus.Dictionary({}, signiture="ss") #an empty dictionary containing string key's and string values dbus.Dictionary({}, key_type=dbus.String, value_type=dbus.String) #an empty dictionary containing string key's and string values Note that you can not specify both types and signatures. I hope the typo "signiture" is just in this bug report and not in the code? |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.