From 5aaf1d1a15bea3b968831c00d7a8347448ead06a Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 6 Nov 2016 14:08:09 +0100 Subject: [PATCH] On python 3.5, sys.subversion have been removed So to get the type of the python interpreter, we need to look at sys.implementation.name which do not return 'cpython', instead of 'CPython', but that's upstream breakage, so not much we can do. --- lib/ansible/module_utils/facts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 821653f958..58c5103283 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -597,7 +597,10 @@ class Facts(object): try: self.facts['python']['type'] = sys.subversion[0] except AttributeError: - self.facts['python']['type'] = None + try: + self.facts['python']['type'] = sys.implementation.name + except AttributeError: + self.facts['python']['type'] = None class Distribution(object):