Changes in python/lib/gen_external.py [66fff6c:0a8f63f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_external.py
r66fff6c r0a8f63f 121 121 proc = subprocess.Popen(cpp_cmd, 122 122 stderr=subprocess.PIPE, 123 stdout=subprocess.PIPE, 124 universal_newlines=True) 123 stdout=subprocess.PIPE) 125 124 assert proc, 'Proc was none' 126 125 cpp_output = proc.stdout.read() … … 128 127 if err_output: 129 128 print("Warning: preprocessor produced errors or warnings:\n%s" \ 130 % err_output )129 % err_output.decode('utf8')) 131 130 if not cpp_output: 132 131 raise_msg = "preprocessor output is empty! Running command " \ 133 132 + "\"%s\" failed" % " ".join(cpp_cmd) 134 133 if err_output: 135 raise_msg += " with stderr: \"%s\"" % err_output 134 raise_msg += " with stderr: \"%s\"" % err_output.decode('utf8') 136 135 else: 137 136 raise_msg += " with no stdout or stderr" 138 137 raise Exception(raise_msg) 139 138 if not isinstance(cpp_output, list): 140 cpp_output = [l.strip() for l in cpp_output. split('\n')]139 cpp_output = [l.strip() for l in cpp_output.decode('utf8').split('\n')] 141 140 142 141 return cpp_output
Note: See TracChangeset
for help on using the changeset viewer.