[PR #6491/9f3c86a5 backport][stable-6] dconf - Try to find a Python interpreter that has gi.repository.GLib (#6504)

dconf - Try to find a Python interpreter that has gi.repository.GLib (#6491)

* dconf - Try to find a Python interpreter that has gi.repository.GLib

If we're invoked in a Python interpreter that doesn't have access to
`gi.repository.GLib`, try to find one that does and respawn the task
in that interpreter.

* ChangeLog fragment for #6491

* Update changelogs/fragments/6491-dconf-respawn.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Simplify import code

* Get rid of ModuleNotFoundError

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9f3c86a589)

Co-authored-by: Jonathan Kamens <jik@kamens.us>
This commit is contained in:
patchback[bot] 2023-05-08 19:57:32 +02:00 committed by GitHub
commit c0230342b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- dconf - if ``gi.repository.GLib`` is missing, try to respawn in a Python interpreter that has it (https://github.com/ansible-collections/community.general/pull/6491).