huge refactor for high RewritePatterns usage and less ad-hoc cpp code
Validate Operations / validate-operations (push) Has been cancelled
Validate Operations / validate-operations (push) Has been cancelled
remove Spatial many ops in favor of tensor ops like in pim
This commit is contained in:
@@ -47,7 +47,9 @@ def _stream_output(fd, process, reporter, treat_eio_as_eof=False, stream_output=
|
||||
return_code = process.wait()
|
||||
if return_code != 0:
|
||||
error_output = captured_output if not stream_output else recent_output
|
||||
raise subprocess.CalledProcessError(return_code, process.args, output=bytes(error_output))
|
||||
exc = subprocess.CalledProcessError(return_code, process.args, output=bytes(error_output))
|
||||
exc.output_already_streamed = stream_output and bool(captured_output)
|
||||
raise exc
|
||||
return bytes(captured_output)
|
||||
|
||||
|
||||
@@ -67,15 +69,15 @@ def run_command_with_reporter(cmd, cwd=None, reporter=None, capture_output=False
|
||||
|
||||
stream_output = bool(getattr(reporter, "verbose", False))
|
||||
if not stream_output:
|
||||
process = subprocess.Popen(
|
||||
completed = subprocess.run(
|
||||
cmd,
|
||||
cwd=cwd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
assert process.stdout is not None
|
||||
output = _stream_output(process.stdout.fileno(), process, reporter, stream_output=False)
|
||||
return output.decode("utf-8", errors="replace") if capture_output else None
|
||||
if completed.returncode != 0:
|
||||
raise subprocess.CalledProcessError(completed.returncode, completed.args, output=completed.stdout)
|
||||
return completed.stdout.decode("utf-8", errors="replace") if capture_output else None
|
||||
|
||||
try:
|
||||
master_fd, slave_fd = pty.openpty()
|
||||
|
||||
Reference in New Issue
Block a user