1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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.
This commit is contained in:
Michael Scherer 2016-11-06 14:08:09 +01:00 committed by Brian Coca
parent fcada3e889
commit 5aaf1d1a15

View file

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