Skip to content

Commit 389cee8

Browse files
committed
fix assertion of python_path, it should be always what 'discovered_interpreter' is
1 parent e7e1c3b commit 389cee8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ansible_mitogen/plugins/action/mitogen_get_stack.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ def run(self, tmp=None, task_vars=None):
5252
'changed': True,
5353
'result': stack,
5454
'_ansible_verbose_always': True,
55+
# for ansible < 2.8, we'll default to /usr/bin/python like before
56+
'discovered_interpreter': self._connection._action._discovered_interpreter
5557
}

tests/ansible/integration/transport_config/python_path.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
- {mitogen_get_stack: {}, register: out}
7878
- assert_equal:
7979
left: out.result[0].kwargs.python_path
80-
right: ["/usr/bin/python"]
80+
right: ["{{out.discovered_interpreter}}"]
81+
8182

8283
- hosts: localhost
8384
vars: {mitogen_via: tc-python-path-local-unset}

0 commit comments

Comments
 (0)