Cast dbus.Double for python-json
At some point a floating point value was added to a sensor
object.
python-json doesn't handle the dbus wrapper types like
dbus.Double. Cast dbus.Double to a float, similar to integers.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/pytools/obmcutil b/pytools/obmcutil
index 6db589e..9207eca 100644
--- a/pytools/obmcutil
+++ b/pytools/obmcutil
@@ -16,6 +16,9 @@
elif (isinstance(it,dbus.Byte)):
if (key != None):
parent[key] = int(it)
+ elif (isinstance(it,dbus.Double)):
+ if (key != None):
+ parent[key] = float(it)
else:
pass