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

libsecret: skip if there is no secret service running #603

Merged
merged 2 commits into from Nov 4, 2022

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Oct 31, 2022

In case libsecret and its Python bindings are available the libsecret backend will get selected. This doesn't mean though that the system service it connects to is available.

This leads to the backend being used and then failing, for example in get_credential() with:
g-dbus-error-quark: The name org.freedesktop.secrets is unknown (2)

To avoid this ask libsecret to connect to the system service first before considering to use it.

Fixes #600

@lazka
Copy link
Contributor Author

lazka commented Oct 31, 2022

I noticed priority gets called quite a lot (~8 times), so the priortiy/viable split that the code hints at seems like a good idea. In this case everything after the first call is quite fast with libsecret, so this shouldn't be a blocker. Just something I've noticed.

@jaraco jaraco force-pushed the libsecret-check-session branch 2 times, most recently from 2589e8d to c8b5d86 Compare November 4, 2022 21:20
lazka and others added 2 commits November 4, 2022 22:44
In case libsecret and its Python bindings are available the
libsecret backend will get selected. This doesn't mean though
that the system service it connects to is available.

This leads to the backend being used and then failing, for example
in get_credential() with:
g-dbus-error-quark: The name org.freedesktop.secrets is unknown (2)

To avoid this ask libsecret to connect to the system service first
before considering to use it.

Fixes jaraco#600
@lazka
Copy link
Contributor Author

lazka commented Nov 4, 2022

(oops, small conflict as I was trying to force push the black CI error fix at the same time, should be fixed again)

@jaraco jaraco merged commit f3b14d0 into jaraco:main Nov 4, 2022
@lazka
Copy link
Contributor Author

lazka commented Nov 5, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants