From 8256242b30005b8a1b52e79149558ad36f1307d6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 5 Mar 2011 21:09:22 +0100 Subject: Adapt platform and test_platform to the build identification changes. --- Lib/platform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Lib/platform.py') diff --git a/Lib/platform.py b/Lib/platform.py index 7fba143642..780301d264 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: -- cgit v1.2.1