Skip to content

Commit

Permalink
Disable KWallet backend if org.kde.kwalletd5 name is not available
Browse files Browse the repository at this point in the history
Fixes jaraco#473.
  • Loading branch information
mitya57 authored and jaraco committed Nov 6, 2020
1 parent c6af045 commit 4ecac57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions keyring/backends/kwallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def priority(cls):
bus = dbus.SessionBus(mainloop=DBusGMainLoop())
except dbus.DBusException as exc:
raise RuntimeError(exc.get_dbus_message())
if not (bus.name_has_owner(cls.bus_name)
or cls.bus_name in bus.list_activatable_names()):
raise RuntimeError("The KWallet daemon is neither running nor "
"activatable through D-Bus")
try:
bus.get_object(cls.bus_name, cls.object_path)
except dbus.DBusException:
Expand Down

0 comments on commit 4ecac57

Please sign in to comment.