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: try:
self.facts['python']['type'] = sys.subversion[0] self.facts['python']['type'] = sys.subversion[0]
except AttributeError: 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): class Distribution(object):