Adapt platform and test_platform to the build identification changes.

This commit is contained in:
Georg Brandl 2011-03-05 21:09:22 +01:00
parent 1ca2e7965c
commit 8256242b30
2 changed files with 8 additions and 2 deletions

View file

@ -1373,7 +1373,9 @@ def _sys_version(sys_version=None):
name = 'CPython'
builddate = builddate + ' ' + buildtime
if hasattr(sys, 'subversion'):
if hasattr(sys, '_mercurial'):
_, branch, revision = sys._mercurial
elif hasattr(sys, 'subversion'):
# sys.subversion was added in Python 2.5
_, branch, revision = sys.subversion
else: