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>
This commit is contained in:
Jonathan Kamens 2023-05-08 13:42:49 -04:00 committed by GitHub
commit 9f3c86a589
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).