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:
parent
fcada3e889
commit
5aaf1d1a15
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue