diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py index 3953eb52e..fa71491b7 100644 --- a/ansible_mitogen/mixins.py +++ b/ansible_mitogen/mixins.py @@ -43,6 +43,7 @@ from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.module_utils.six.moves import shlex_quote from ansible.parsing.utils.jsonify import jsonify +from ansible.utils.display import Display import mitogen.core import mitogen.select @@ -54,6 +55,8 @@ import ansible_mitogen.utils.unsafe +display = Display() + LOG = logging.getLogger(__name__) @@ -107,10 +110,19 @@ def __init__(self, task, connection, *args, **kwargs): self._rediscovered_python = False # redeclaring interpreter discovery vars here in case running ansible < 2.8.0 self._discovered_interpreter_key = None - self._discovered_interpreter = False + self._discovered_interpreterr = False self._discovery_deprecation_warnings = [] self._discovery_warnings = [] + @property + def _discovered_interpreter(self): + return self._discovered_interpreterr + + @_discovered_interpreter.setter + def _discovered_interpreter(self, value): + display.warning('%r %s' % (value, traceback.format_stack())) + self._discovered_interpreterr = value + def run(self, tmp=None, task_vars=None): """ Override run() to notify Connection of task-specific data, so it has a