Skip to content

Commit

Permalink
Simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmartosdev committed Aug 18, 2023
1 parent bf172b1 commit fe12355
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions compose_mpp_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,11 @@ def compile_project(compile_task):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)

# Read and print the error output in real-time
while True:
stderr_line = process.stderr.readline().decode('utf-8')

if stderr_line:
sys.stderr.write(stderr_line)
sys.stderr.flush()

if process.poll() is not None and stderr_line == '':
break

process.wait()
stdout, stderr = process.communicate()

if process.returncode != 0:
sys.stderr.write(stderr.decode('utf-8'))
sys.stderr.flush()
sys.exit(process.returncode)


Expand Down

0 comments on commit fe12355

Please sign in to comment.