From c6bc6b25761bbf65dfe82b1dfadb69880b9b6537 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 Jul 2017 10:19:03 +1000 Subject: [PATCH] tools: ratbagd: don't silence UnknownProperty errors Now that we've moved all properties to read-write where required, unleash the exception again - any UnknownProperty error is now a bug. Signed-off-by: Peter Hutterer --- tools/ratbagd.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tools/ratbagd.py b/tools/ratbagd.py index 43a9e782..138f3500 100644 --- a/tools/ratbagd.py +++ b/tools/ratbagd.py @@ -159,18 +159,9 @@ class _RatbagdDBus(GObject.GObject): # args to .Set are "interface name", "function name", value-variant val = GLib.Variant("{}".format(type), value) pval = GLib.Variant("(ssv)".format(type), (self._interface, property, val)) - try: - self._proxy.call_sync("org.freedesktop.DBus.Properties.Set", - pval, Gio.DBusCallFlags.NO_AUTO_START, - 500, None) - except GLib.Error as e: - # FIXME: Temporary fix until the DBus API revamp is complete: - # Silently ignore DBus unknown property warnings so the bits we - # already have updated are testable. In the future when all - # properties are switched from SetFoo to just a writable - # property Foo, remove this error - if "org.freedesktop.DBus.Error.UnknownProperty" not in e.message: - raise + self._proxy.call_sync("org.freedesktop.DBus.Properties.Set", + pval, Gio.DBusCallFlags.NO_AUTO_START, + 500, None) # This is our local copy, so we don't have to wait for the async # update