MCPcopy Create free account
hub / github.com/boostorg/build / _env_del

Function _env_del

v2/test/configuration.py:253–265  ·  view source on GitHub ↗

Unsets the given environment variable if it is currently set. Note that we can not use os.environ.pop() or os.environ.clear() here since prior to Python 2.6 these functions did not remove the actual environment variable by calling os.unsetenv().

(name)

Source from the content-addressed store, hash-verified

251
252
253def _env_del(name):
254 """
255 Unsets the given environment variable if it is currently set.
256
257 Note that we can not use os.environ.pop() or os.environ.clear() here
258 since prior to Python 2.6 these functions did not remove the actual
259 environment variable by calling os.unsetenv().
260
261 """
262 try:
263 del os.environ[name]
264 except KeyError:
265 pass
266
267
268def _env_set(name, value):

Callers 1

_env_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected