MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _get_env_int

Function _get_env_int

agents/coldstart-agent/main.py:572–580  ·  view source on GitHub ↗

Read an integer env var without failing the cold-start flow.

(name: str, default: int)

Source from the content-addressed store, hash-verified

570 "inferred_topics": [],
571 }
572
573
574def _get_env_int(name: str, default: int) -> int:
575 """Read an integer env var without failing the cold-start flow."""
576 raw = str(os.environ.get(name, "")).strip()
577 if not raw:
578 return default
579 try:
580 return int(raw)
581 except ValueError:
582 return default
583

Calls 1

getMethod · 0.80

Tested by

no test coverage detected