forked from M-Labs/artiq
1
0
Fork 0

compiler: transparently handle Windows newlines in RunTool.

This commit is contained in:
whitequark 2018-05-05 01:43:00 +00:00 committed by Sebastien Bourdeauducq
parent 0faf781d5f
commit 88134db35a
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ class RunTool:
for argument in self._pattern:
cmdline.append(argument.format(**self._tempnames))
process = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
stdout, stderr = process.communicate()
if process.returncode != 0:
raise Exception("{} invocation failed: {}".