MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _configure_local_no_proxy

Function _configure_local_no_proxy

src/main.py:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def _configure_local_no_proxy() -> None:
41 for env_name in ("NO_PROXY", "no_proxy"):
42 raw_value = str(os.environ.get(env_name, "") or "")
43 entries = [item.strip() for item in raw_value.replace(";", ",").split(",") if item.strip()]
44 normalized = {item.lower() for item in entries}
45 changed = False
46 for host in _LOCAL_NO_PROXY_HOSTS:
47 if host.lower() not in normalized:
48 entries.append(host)
49 normalized.add(host.lower())
50 changed = True
51 if changed or not raw_value:
52 os.environ[env_name] = ",".join(entries)
53
54
55def _configure_asyncio_policy() -> None:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected