Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Fix serialize_val method
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkin committed Nov 8, 2016
1 parent 88fa439 commit d07e35a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubesdbus/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ def serialize_val(value):
elif isinstance(value, int):
return dbus.Int32(value)
elif callable(value):
return serialize_val(value)
return serialize_val(value())
elif isinstance(value, qubes.Label):
return label_path(value)
elif isinstance(value, qubes.vm.qubesvm.QubesVM):
return domain_path(value)
elif isinstance(value, qubes.devices.DeviceCollection):
return dbus.Array(device_collection_data(value), signature='a{sv}')
elif isinstance(value, qubes.devices.DeviceInfo):
return dbus.Dictionary(device_collection_data(value), signature='sv')
return dbus.Dictionary(device_data(value), signature='sv')
elif isinstance(value, re._pattern_type):
return dbus.String(value.pattern)
else:
Expand Down

0 comments on commit d07e35a

Please sign in to comment.