Merge "container-puppet: update 'env' when not null"

This commit is contained in:
Zuul 2019-11-08 17:58:15 +00:00 committed by Gerrit Code Review
commit 9f7065b541
1 changed files with 3 additions and 6 deletions

View File

@ -378,14 +378,11 @@ def infile_processing(infiles):
)
# When python 27 support is removed, we will be able to use:
# z = {**x, **y} to merge the dicts.
infile_data.get(
'environment',
{}
).update(
if infile_data.get('environment', None) is None:
infile_data['environment'] = {}
infile_data['environment'].update(
{'TRIPLEO_CONFIG_HASH': config_hash}
)
env = infile_data.get('environment')
infile_data['environment'] = env
outfile = os.path.join(
os.path.dirname(