summaryrefslogtreecommitdiff
path: root/sunshine
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-15 19:15:17 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-15 19:15:17 +0200
commitf5984e373d43cef98e278a72ec07dcbfa589c6e0 (patch)
treecdc1d328211bcd23a2fc96e2ddb4a9d9f31dde71 /sunshine
parent4e6910c75c06c17424909b669aff466e509914d2 (diff)
Add a signature for the dbus.Array's in GetContactCapabilities.
This prevents me from getting: process 4592: Array or variant type requires that type uint32 be written, but end_dict_entry was written. The overall signature expected here was '' and we are on byte 386 of that signature. And: ERROR:dbus.service:Unable to append <The entire dbus message> to message with signature a{ua{sv}}: <type 'exceptions.ValueError'>: invalid literal for long() with base 10: 'org.freedesktop.Telepathy.Channel.Type.Text' from http://git.collabora.co.uk/?p=user/maiku/telepathy-butterfly.git;a=commit;h=b38a35b08eaed2afb15fa878463e36405348d1c1
Diffstat (limited to 'sunshine')
-rw-r--r--sunshine/capabilities.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sunshine/capabilities.py b/sunshine/capabilities.py
index 40c1f78..f2421a9 100644
--- a/sunshine/capabilities.py
+++ b/sunshine/capabilities.py
@@ -90,11 +90,15 @@ class SunshineCapabilities(telepathy.server.ConnectionInterfaceCapabilities,
if 0 in handles:
raise telepathy.InvalidHandle('Contact handle list contains zero')
+ #a{ua(a{sv}as)}
ret = dbus.Dictionary({}, signature='ua(a{sv}as)')
for i in handles:
+ print i
handle = self.handle(telepathy.HANDLE_TYPE_CONTACT, i)
- ret[handle] = self._contact_caps[handle]
-
+ if handle in self._contact_caps:
+ ret[handle] = dbus.Array(self._contact_caps[handle], signature='(a{sv}as)')
+ else:
+ ret[handle] = []
return ret
def UpdateCapabilities(self, caps):