diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py index 2f66961b..c34aa68a 100644 --- a/ansible_mitogen/mixins.py +++ b/ansible_mitogen/mixins.py @@ -485,8 +485,7 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase): # TODO: what exception is thrown? except: # we've reached the last python attempted and failed - # TODO: could use enumerate(), need to check which version of python first had it though - if possible_python == 'python': + if possible_python == possible_pythons[-1]: raise else: continue diff --git a/docs/changelog.rst b/docs/changelog.rst index e5f3340b..c6320bae 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -30,6 +30,8 @@ In progress (unreleased) discovery attributes * :gh:issue:`1213` :mod:`ansible_mitogen`: Rename Mitogen interpreter discovery attributes +* :gh:issue:`1213` :mod:`ansible_mitogen`: Decouple possible_pythons order & + error handling v0.3.21 (2025-01-20)