From 9dc7efefe4e8cb7690fc9f1ad9b1c82d088d7f19 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 5 May 2018 01:43:00 +0000 Subject: [PATCH] compiler: transparently handle Windows newlines in RunTool. --- artiq/compiler/targets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/targets.py b/artiq/compiler/targets.py index f2c7c408b..22c1e9a2b 100644 --- a/artiq/compiler/targets.py +++ b/artiq/compiler/targets.py @@ -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: {}".