Mercurial > public > mercurial-scm > hg
comparison tests/run-tests.py @ 24074:4d9c738d942f
run-tests: avoid printing extra newlines from install log
If an installation error occurs, we print the install log. Before,
output had extra newlines because we were using "print" on data that was
already newline terminated.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 16:15:02 -0800 |
parents | d64dd1252386 |
children | 4bf484276787 |
comparison
equal
deleted
inserted
replaced
24073:ff5caa8dfd99 | 24074:4d9c738d942f |
---|---|
1868 if not self.options.verbose: | 1868 if not self.options.verbose: |
1869 os.remove(installerrs) | 1869 os.remove(installerrs) |
1870 else: | 1870 else: |
1871 f = open(installerrs, 'rb') | 1871 f = open(installerrs, 'rb') |
1872 for line in f: | 1872 for line in f: |
1873 print line | 1873 sys.stdout.write(line) |
1874 f.close() | 1874 f.close() |
1875 sys.exit(1) | 1875 sys.exit(1) |
1876 os.chdir(self._testdir) | 1876 os.chdir(self._testdir) |
1877 | 1877 |
1878 self._usecorrectpython() | 1878 self._usecorrectpython() |