summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-03-05 20:09:22 (GMT)
committerGeorg Brandl <georg@python.org>2011-03-05 20:09:22 (GMT)
commit8256242b30005b8a1b52e79149558ad36f1307d6 (patch)
treee02321f555790ceb1340b40da891b94556234064 /Lib/platform.py
parent1ca2e7965c52525684bb517401c513158a8af989 (diff)
downloadcpython-8256242b30005b8a1b52e79149558ad36f1307d6.zip
cpython-8256242b30005b8a1b52e79149558ad36f1307d6.tar.gz
cpython-8256242b30005b8a1b52e79149558ad36f1307d6.tar.bz2
Adapt platform and test_platform to the build identification changes.
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 7fba143..780301d 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -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: