changeset 32342:8627cf4de929

run-tests: drop fallback for sysconfig for pre-py2.7
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 16 May 2017 14:40:22 -0700
parents 8a87bfc5bebb
children dc131b9772f2
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue May 16 17:47:27 2017 -0700
+++ b/tests/run-tests.py	Tue May 16 14:40:22 2017 -0700
@@ -58,11 +58,7 @@
 import socket
 import subprocess
 import sys
-try:
-    import sysconfig
-except ImportError:
-    # sysconfig doesn't exist in Python 2.6
-    sysconfig = None
+import sysconfig
 import tempfile
 import threading
 import time
@@ -882,8 +878,7 @@
             offset = '' if i == 0 else '%s' % i
             env["HGPORT%s" % offset] = '%s' % (self._startport + i)
         env = os.environ.copy()
-        if sysconfig is not None:
-            env['PYTHONUSERBASE'] = sysconfig.get_config_var('userbase')
+        env['PYTHONUSERBASE'] = sysconfig.get_config_var('userbase')
         env['HGEMITWARNINGS'] = '1'
         env['TESTTMP'] = self._testtmp
         env['HOME'] = self._testtmp