MCPcopy
hub / github.com/bugy/script-server / read_variable

Function read_variable

src/utils/env_utils.py:30–35  ·  view source on GitHub ↗
(variable_name, *, fail_on_missing=True)

Source from the content-addressed store, hash-verified

28
29
30def read_variable(variable_name, *, fail_on_missing=True):
31 value = os.environ.get(variable_name)
32 if fail_on_missing and (value == '' or value is None):
33 raise Exception('Environment variable ' + variable_name + ' is not set')
34
35 return value
36
37
38def is_min_version(version, system_version=None):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected