MCPcopy Create free account
hub / github.com/Improbable-AI/VisionProTeleop / run_command

Method run_command

avp_stream/bridge_avp.py:54–63  ·  view source on GitHub ↗

Run a shell command with error handling.

(self, cmd: list, check: bool = True, capture: bool = True)

Source from the content-addressed store, hash-verified

52 return True
53
54 def run_command(self, cmd: list, check: bool = True, capture: bool = True) -> subprocess.CompletedProcess:
55 """Run a shell command with error handling."""
56 try:
57 if capture:
58 result = subprocess.run(cmd, capture_output=True, text=True, check=check)
59 else:
60 result = subprocess.run(cmd, check=check)
61 return result
62 except subprocess.CalledProcessError as e:
63 raise BridgeSetupError(f"Command failed: {' '.join(cmd)}\n{e.stderr if capture else ''}")
64
65 def detect_primary_interface_macos(self) -> Tuple[str, str]:
66 """Detect primary network interface on macOS."""

Callers 4

setup_bridge_macosMethod · 0.95
setup_bridge_linuxMethod · 0.95

Calls 2

BridgeSetupErrorClass · 0.85
runMethod · 0.80

Tested by

no test coverage detected