mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
fpga/build_images.py: process both stdout and stderr
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
cc99484d99
commit
d6186eff88
@ -144,13 +144,10 @@ class Build:
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE)
|
||||
|
||||
while True:
|
||||
line = await proc.stdout.readline()
|
||||
if not line:
|
||||
break
|
||||
line = line.decode('utf-8').strip()
|
||||
|
||||
self.scan_log_line(line)
|
||||
await asyncio.gather(
|
||||
self.process_stream(proc.stdout),
|
||||
self.process_stream(proc.stderr),
|
||||
)
|
||||
|
||||
self.synth_done()
|
||||
self.build_done()
|
||||
@ -166,6 +163,15 @@ class Build:
|
||||
|
||||
self.elapsed_time = datetime.datetime.now() - self.start_time
|
||||
|
||||
async def process_stream(self, stream):
|
||||
while True:
|
||||
line = await stream.readline()
|
||||
if not line:
|
||||
break
|
||||
line = line.decode('utf-8').strip()
|
||||
|
||||
self.scan_log_line(line)
|
||||
|
||||
def scan_log_line(self, line):
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user