prepare_host_environments can not add implementation environments

This commit is contained in:
iLLiCiTiT 2021-05-18 12:20:49 +02:00
parent a3e89486ad
commit f8f64b5a05

View file

@ -1031,7 +1031,7 @@ def _merge_env(env, current_env):
return result
def prepare_host_environments(data):
def prepare_host_environments(data, implementation_envs=True):
"""Modify launch environments based on launched app and context.
Args:
@ -1090,7 +1090,8 @@ def prepare_host_environments(data):
loaded_env = _merge_env(acre.compute(env_values), data["env"])
final_env = None
if app.host_name:
#
if app.host_name and implementation_envs:
module = __import__("openpype.hosts", fromlist=[app.host_name])
host_module = getattr(module, app.host_name, None)
add_implementation_envs = None
@ -1099,6 +1100,7 @@ def prepare_host_environments(data):
host_module, "add_implementation_envs", None
)
if add_implementation_envs:
# Function may only modify passed dict without returning value
final_env = add_implementation_envs(loaded_env)
if final_env is None: