[telepathy-gabble/telepathy-gabble-0.8] unwrap(): handle dbus.Boolean correctly

Dafydd Harries dafydd.harries at collabora.co.uk
Tue Sep 22 07:11:22 PDT 2009


---
 tests/twisted/servicetest.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index 727655d..747d3ce 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -269,7 +269,10 @@ def unwrap(x):
     if isinstance(x, dict):
         return dict([(unwrap(k), unwrap(v)) for k, v in x.iteritems()])
 
-    for t in [unicode, str, long, int, float, bool]:
+    if isinstance(x, dbus.Boolean):
+        return bool(x)
+
+    for t in [unicode, str, long, int, float]:
         if isinstance(x, t):
             return t(x)
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list