From 5a5619f00c377a5af1b06068b7d18deaad324dac Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sat, 27 Feb 2021 21:58:00 +0100
Subject: [PATCH] Throw error when failing to add method to daemon

This should be a fatal error as it's a misconfiguration of the daemon.
As warning it's likely that it won't be seen by the developer.
---
 daemon/openrazer_daemon/hardware/device_base.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/daemon/openrazer_daemon/hardware/device_base.py b/daemon/openrazer_daemon/hardware/device_base.py
index 3c37154f..d3a584ba 100644
--- a/daemon/openrazer_daemon/hardware/device_base.py
+++ b/daemon/openrazer_daemon/hardware/device_base.py
@@ -806,8 +806,7 @@ class RazerDevice(DBusService):
                 self.logger.debug("Adding %s.%s method to DBus", new_function.interface, new_function.name)
                 self.add_dbus_method(new_function.interface, new_function.name, new_function, new_function.in_sig, new_function.out_sig, new_function.byte_arrays)
             except KeyError as e:
-                self.logger.warning("Couldn't add method to DBus: %s", e)
-                pass
+                raise RuntimeError("Couldn't add method to DBus: " + str(e)) from None
 
     def suspend_device(self):
         """
-- 
GitLab