MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _resolve_active_cluster

Function _resolve_active_cluster

python/openshell/sandbox.py:1371–1382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1369
1370
1371def _resolve_active_cluster() -> str:
1372 env_gateway = os.environ.get("OPENSHELL_GATEWAY")
1373 if env_gateway:
1374 return env_gateway
1375 active_file = _xdg_config_home() / "openshell" / "active_gateway"
1376 try:
1377 value = active_file.read_text(encoding="utf-8").strip()
1378 except FileNotFoundError:
1379 raise SandboxError("no active gateway configured") from None
1380 if value == "":
1381 raise SandboxError("no active gateway configured")
1382 return value

Callers 1

from_active_clusterMethod · 0.85

Calls 3

SandboxErrorClass · 0.85
_xdg_config_homeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected