From 29f8f55d944d03e38ac465c2ce41de9c4d40fa7c Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sat, 19 Aug 2017 21:36:41 +0200 Subject: [PATCH] Ratbagd: do not return _dbus_call return value in setters Setters do not support returning values. --- piper/ratbagd.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/piper/ratbagd.py b/piper/ratbagd.py index 4456fd1..3177364 100644 --- a/piper/ratbagd.py +++ b/piper/ratbagd.py @@ -654,9 +654,8 @@ class RatbagdButton(_RatbagdDBus): @param button The button to map to, as int """ - ret = self._dbus_call("SetButtonMapping", "u", button) + self._dbus_call("SetButtonMapping", "u", button) self._set_dbus_property("ButtonMapping", "u", button, readwrite=False) - return ret @GObject.Property def macro(self): @@ -675,9 +674,8 @@ class RatbagdButton(_RatbagdDBus): @param macro A list of (type, value) tuples to form the new macro. """ - ret = self._dbus_call("SetMacro", "a(uu)", macro) + self._dbus_call("SetMacro", "a(uu)", macro) self._set_dbus_property("Macro", "a(uu)", macro, readwrite=False) - return ret @GObject.Property def special(self): @@ -690,9 +688,8 @@ class RatbagdButton(_RatbagdDBus): @param special The special entry, as one of RatbagdButton.ACTION_SPECIAL_* """ - ret = self._dbus_call("SetSpecialMapping", "u", special) + self._dbus_call("SetSpecialMapping", "u", special) self._set_dbus_property("SpecialMapping", "u", special, readwrite=False) - return ret @GObject.Property def key(self): @@ -707,9 +704,8 @@ class RatbagdButton(_RatbagdDBus): @param keys A list of integers, the first being the keycode and the rest modifiers. """ - ret = self._dbus_call("SetKeyMapping", "au", keys) + self._dbus_call("SetKeyMapping", "au", keys) self._set_dbus_property("KeyMapping", "au", keys, readwrite=False) - return ret @GObject.Property def action_type(self):