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

Method check_prerequisites

avp_stream/bridge_avp.py:37–52  ·  view source on GitHub ↗

Check if required tools are available for the current platform.

(self)

Source from the content-addressed store, hash-verified

35 self.bridge_ip: Optional[str] = None
36
37 def check_prerequisites(self) -> bool:
38 """Check if required tools are available for the current platform."""
39 if self.os_type == "Darwin": # macOS
40 required_commands = ["ifconfig", "route", "sysctl", "pfctl"]
41 elif self.os_type == "Linux":
42 required_commands = ["ip", "brctl", "sysctl", "iptables"]
43 else:
44 return False
45
46 for cmd in required_commands:
47 if not shutil.which(cmd):
48 print(f"❌ Error: Required command '{cmd}' not found")
49 if self.os_type == "Linux" and cmd == "brctl":
50 print(" Install with: sudo apt-get install bridge-utils")
51 return False
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."""

Callers 1

setupMethod · 0.95

Calls 1

printFunction · 0.50

Tested by

no test coverage detected