ansible_mitogen: Decouple possible_pythons order & error handling

'python' could now be tried earlier, or not at all.
This commit is contained in:
Alex Willmer 2025-01-23 13:03:42 +00:00
parent 356be2e65f
commit 51c7b789f7
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)