tests/run-tests.py
branchstable
changeset 1293 6e9bfd51bc6f
parent 1292 aa3c5b7a290e
child 1295 8e66ac9c0f0e
equal deleted inserted replaced
1292:aa3c5b7a290e 1293:6e9bfd51bc6f
  1046     the current Python interpreter."""
  1046     the current Python interpreter."""
  1047     global _hgpath
  1047     global _hgpath
  1048     if _hgpath is not None:
  1048     if _hgpath is not None:
  1049         return _hgpath
  1049         return _hgpath
  1050 
  1050 
  1051     cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
  1051     cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"'
  1052     pipe = os.popen(cmd % PYTHON)
  1052     pipe = os.popen(cmd % PYTHON)
  1053     try:
  1053     try:
  1054         _hgpath = pipe.read().strip()
  1054         _hgpath = pipe.read().strip()
  1055     finally:
  1055     finally:
  1056         pipe.close()
  1056         pipe.close()