MCPcopy Index your code
hub / github.com/python/cpython / print_called_process_error

Function print_called_process_error

Platforms/Apple/__main__.py:1045–1057  ·  view source on GitHub ↗
(e: subprocess.CalledProcessError)

Source from the content-addressed store, hash-verified

1043
1044
1045def print_called_process_error(e: subprocess.CalledProcessError) -> None:
1046 for stream_name in ["stdout", "stderr"]:
1047 content = getattr(e, stream_name)
1048 stream = getattr(sys, stream_name)
1049 if content:
1050 stream.write(content)
1051 if not content.endswith("\n"):
1052 stream.write("\n")
1053
1054 # shlex uses single quotes, so we surround the command with double quotes.
1055 print(
1056 f'Command "{join_command(e.cmd)}" returned exit status {e.returncode}'
1057 )
1058
1059
1060def main() -> None:

Callers 1

mainFunction · 0.70

Calls 3

join_commandFunction · 0.70
writeMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…