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

Commit

Permalink
proxy.py fix property_get/set
Browse files Browse the repository at this point in the history
- Fix typing
- Fix keyword args on get_dbus_method
  • Loading branch information
kalkin committed Jun 27, 2017
1 parent 743420f commit ce1035e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions qubesdbus/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,18 @@ def forward_app_event(self, vm, event, *args, **kwargs):
log.warn('Unknown %s from %s %s %s', event, vm, args, kwargs)


def property_get(proxy, name):
# type: (dbus.proxies.ProxyObject, str, Any) -> None
def property_get(proxy: dbus.proxies.ProxyObject, name: str) -> Any:
''' Helper for setting a property on a helper '''
func = proxy.get_dbus_method('Get', 'org.freedesktop.DBus.Properties')
func = proxy.get_dbus_method(
'Get', dbus_interface='org.freedesktop.DBus.Properties')
func('', name)

def property_set(proxy, name, value):
# type: (dbus.proxies.ProxyObject, str, Any) -> None

def property_set(proxy: dbus.proxies.ProxyObject, name: str,
value: Any) -> None:
''' Helper for setting a property on a helper '''
func = proxy.get_dbus_method('Set', 'org.freedesktop.DBus.Properties')
func = proxy.get_dbus_method(
'Set', dbus_interface='org.freedesktop.DBus.Properties')
func('', name, value)


Expand Down

0 comments on commit ce1035e

Please sign in to comment.