mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
In some cases we get Piper trying to use None as a list, see https://github.com/libratbag/piper/issues/237 This can be reproduced by returning an error (e.g. -ENOMEM) from ratbagd_get_devices(). That error isn't handled anywhere on the client side, the effective result is that the property is None when calling proxy.get_cached_property(). The error is visible on the bus: method call time=1535084121.223284 sender=:1.1311 -> destination=:1.1310 serial=7 path=/org/freedesktop/ratbag1; interface=org.freedesktop.DBus.Properties; member=GetAll string "org.freedesktop.ratbag1.Manager" error time=1535084121.223433 sender=:1.1310 -> destination=:1.1311 error_name=org.freedesktop.DBus.Error.NoMemory reply_serial=7 string "Cannot allocate memory" Make ratbagd.py more robust here and always return an empty list for those properties where we expect an array. This papers over the real bug which is that a) we need better logging in ratbagd on errors and b) something on the other side needs to handle this error. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>