MCPcopy Create free account
hub / github.com/apache/impala / build_shell_env

Function build_shell_env

tests/shell/util.py:54–65  ·  view source on GitHub ↗

Construct the environment for the shell to run in based on 'env', or the current process's environment if env is None.

(env=None)

Source from the content-addressed store, hash-verified

52
53
54def build_shell_env(env=None):
55 """ Construct the environment for the shell to run in based on 'env', or the current
56 process's environment if env is None."""
57 if not env: env = os.environ
58 # Don't inherit PYTHONPATH or LD_LIBRARY_PATH - the shell launch script must set
59 # these to include dependencies. Copy 'env' to avoid mutating argument or os.environ.
60 env = dict(env)
61 if "PYTHONPATH" in env:
62 del env["PYTHONPATH"]
63 if "LD_LIBRARY_PATH" in env:
64 del env["LD_LIBRARY_PATH"]
65 return env
66
67
68def assert_var_substitution(result):

Callers 3

spawn_shellFunction · 0.85

Calls

no outgoing calls

Tested by 1