Mercurial > hg
comparison tests/run-tests.py @ 25057:cf49cf074ec2
run-tests: os.popen returns a string, make it bytes again
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 13 Apr 2015 18:07:40 -0400 |
parents | e5f6c6ec21b8 |
children | caa2043cc322 |
comparison
equal
deleted
inserted
replaced
25056:e5f6c6ec21b8 | 25057:cf49cf074ec2 |
---|---|
2099 | 2099 |
2100 cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"' | 2100 cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"' |
2101 pipe = os.popen(cmd % PYTHON) | 2101 pipe = os.popen(cmd % PYTHON) |
2102 try: | 2102 try: |
2103 self._hgpath = pipe.read().strip() | 2103 self._hgpath = pipe.read().strip() |
2104 if sys.version_info[0] == 3: | |
2105 self._hgpath = self._hgpath.encode('utf-8') | |
2104 finally: | 2106 finally: |
2105 pipe.close() | 2107 pipe.close() |
2106 | 2108 |
2107 return self._hgpath | 2109 return self._hgpath |
2108 | 2110 |