Merge "Trim whitespace in multi-line env descriptions"

This commit is contained in:
Zuul 2019-04-16 05:28:25 +00:00 committed by Gerrit Code Review
commit 47126b8431
4 changed files with 9 additions and 6 deletions

View File

@ -181,7 +181,10 @@ def _generate_environment(input_env, output_path, parent_env=None):
env_desc = env.get('description', '')
env_file.write(u'# description: |\n')
for line in env_desc.splitlines():
if line:
env_file.write(u'# %s\n' % line)
else:
env_file.write('#\n')
if parameter_defaults or static_defaults:
env_file.write(u'parameter_defaults:\n')
write_params_entry(env_file, parameter_defaults[_PARAMETERS],