MCPcopy
hub / github.com/reflex-dev/reflex / _format_subprocess_output

Function _format_subprocess_output

tests/integration/lighthouse_utils.py:714–727  ·  view source on GitHub ↗

Normalize subprocess output for failure messages. Args: output: The captured subprocess output. Returns: The output as a decoded string.

(output: str | bytes | None)

Source from the content-addressed store, hash-verified

712
713
714def _format_subprocess_output(output: str | bytes | None) -> str:
715 """Normalize subprocess output for failure messages.
716
717 Args:
718 output: The captured subprocess output.
719
720 Returns:
721 The output as a decoded string.
722 """
723 if output is None:
724 return ""
725 if isinstance(output, bytes):
726 return output.decode(errors="replace")
727 return output
728
729
730@cache

Callers 2

run_lighthouseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected