From ba350aa6cf85ef3e50706d72da533d11168ae484 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Tue, 11 Feb 2020 16:25:57 -0800 Subject: [PATCH] assigned interpreter vars to the wrong class --- ansible_mitogen/connection.py | 5 ----- ansible_mitogen/mixins.py | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible_mitogen/connection.py b/ansible_mitogen/connection.py index f4cf69a5..80393c84 100644 --- a/ansible_mitogen/connection.py +++ b/ansible_mitogen/connection.py @@ -507,11 +507,6 @@ class Connection(ansible.plugins.connection.ConnectionBase): # we need it to be an object with the value of "_finding_python_interpreter" in case we aren't # running interpreter discovery fully _action = type(str('actionTemp'), (object,), {'_finding_python_interpreter': False}) - # redeclaring interpreter discovery vars here in case running ansible < 2.8.0 - _discovered_interpreter_key = None - _discovered_interpreter = False - _discovery_deprecation_warnings = [] - _discovery_warnings = [] def __del__(self): """ diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py index fd90bb78..7c2d7975 100644 --- a/ansible_mitogen/mixins.py +++ b/ansible_mitogen/mixins.py @@ -116,6 +116,11 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase): # required for python interpreter discovery connection.templar = self._templar self._finding_python_interpreter = False + # redeclaring interpreter discovery vars here in case running ansible < 2.8.0 + self._discovered_interpreter_key = None + self._discovered_interpreter = False + self._discovery_deprecation_warnings = [] + self._discovery_warnings = [] def run(self, tmp=None, task_vars=None): """