File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -189,11 +189,18 @@ def parse_pcm_input(inputFile):
189
189
def execute(parsedFile):
190
190
executable = os.path.join(os.path.dirname(__file__), "run_pcm" + "@CMAKE_EXECUTABLE_SUFFIX@")
191
191
if (executable):
192
- try:
193
- subprocess.check_output([executable, parsedFile])
194
- except subprocess.CalledProcessError as e:
195
- print((e.output))
196
- sys.exit(1)
192
+ p = subprocess.Popen([executable, parsedFile],
193
+ shell=False,
194
+ stdin=subprocess.PIPE,
195
+ stdout=subprocess.PIPE,
196
+ stderr=subprocess.PIPE)
197
+ stdout_coded, stderr_coded = p.communicate()
198
+ stdout = stdout_coded.decode('UTF-8')
199
+ stderr = stderr_coded.decode('UTF-8')
200
+
201
+ print(stdout)
202
+ # Print the contents of stderr, without exiting
203
+ sys.stderr.write(stderr)
197
204
else:
198
205
print('No executable available for standalone run')
199
206
sys.exit(1)
You can’t perform that action at this time.
0 commit comments