MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _extract_exit_code

Method _extract_exit_code

tools/terminal.py:358–362  ·  view source on GitHub ↗
(raw_output: str, marker: str)

Source from the content-addressed store, hash-verified

356
357 @staticmethod
358 def _extract_exit_code(raw_output: str, marker: str) -> int:
359 match = re.search(rf"{re.escape(marker)}:(-?\d+)", raw_output)
360 if match:
361 return int(match.group(1))
362 return 0
363
364 @staticmethod
365 def _strip_marker(raw_output: str, marker: str) -> str:

Callers 1

_execute_sshMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected