Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not crash if ratbagd is not loaded #2

bentiss opened this Issue Mar 17, 2016 · 0 comments


None yet
1 participant
Copy link

bentiss commented Mar 17, 2016

With the new dbus activation, users are still required to call systemctl enable ratbagd.service before being able to launch piper.
If this step has not been completed, piper crashes with GLib.Error: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.ratbag1: GDBus.Error:org.freedesktop.systemd1.LoadFailed: Unit dbus-org.freedesktop.ratbag1.service failed to load: No such file or directory. (36).

It would be good to catch the exception and present a message to the user that there are some configuration commands that needs to be run.

whot added a commit to libratbag/ratbagd that referenced this issue Mar 30, 2017

python: catch more DBus exceptions
Gio.bus_get_sync may return None when the DBus service is not available (see
libratbag/piper#2). In addition to this, the service may time out when it is
being started in which case Gio.DBusProxy.new_sync will raise a GLib.Gerror.

This commit checks for both scenarios and raises a RatbagdDBusUnavailable
exception when either one of them occurs. This will in turn be caught in for
example Piper to properly deal with this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.