Commit b3ee3b52 authored by Michal Čihař's avatar Michal Čihař

Allow to inject extra vars to environment

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 11e840eb
......@@ -141,11 +141,13 @@ def get_configuration_errors():
return cache.get('configuration-errors', [])
def get_clean_env():
def get_clean_env(extra=None):
"""
Returns cleaned up environment for subprocess execution.
"""
environ = {}
if extra is not None:
environ.update(extra)
variables = ('HOME', 'PATH', 'LANG', 'LD_LIBRARY_PATH')
for var in variables:
if var in os.environ:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment