libre-server / rolekit

'rolekit' is a daemon for Linux systems providing a stable D-BUS interface to manage the deployment of ​Server Roles.
19 stars 7 forks source link

Simplify the dbus property method creation #36

Open DirectXMan12 opened 8 years ago

DirectXMan12 commented 8 years ago

Code like

@dbus.service.property(DBUS_INTERFACE_ROLE_INSTANCE, signature='s')
@dbus_handle_exceptions
def dict1(self):
    return self.get_dbus_property(self, "dict2")

Can probably be autogenerated using the _DEFAULTS dict using some metaclass magic instead of being written by hand.