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

Function print_called_process_error

Android/android.py:1051–1065  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1049
1050
1051def print_called_process_error(e):
1052 for stream_name in ["stdout", "stderr"]:
1053 content = getattr(e, stream_name)
1054 if isinstance(content, bytes):
1055 content = content.decode(*DECODE_ARGS)
1056 stream = getattr(sys, stream_name)
1057 if content:
1058 stream.write(content)
1059 if not content.endswith("\n"):
1060 stream.write("\n")
1061
1062 # shlex uses single quotes, so we surround the command with double quotes.
1063 print(
1064 f'Command "{join_command(e.cmd)}" returned exit status {e.returncode}'
1065 )
1066
1067
1068if __name__ == "__main__":

Callers 2

find_pidFunction · 0.70
mainFunction · 0.70

Calls 4

join_commandFunction · 0.70
decodeMethod · 0.45
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…