Commit Graph

3 Commits

Author SHA1 Message Date
Andreas Jaeger
e7f77f283f Some python yaml fixes
libyaml now needs to Loader keyword to not throw a warning, use
safe_load instead everywhere.

sort_keys isn't supported for reasons surpassing understanding, so
switch to ruamel.yaml for the places where we write contents back
out.

Our ruamel.yaml wrapper strips extra leading space, which is needed
when the root object is a list. When the root object is NOT a list,
it's not needed. Add a flag to the constructor to toggle the
behavior.

For gerrit/projects.yaml this leads to a different wrapping of
description fields, which is included here.

Let ruamel.yaml handle comments

Since we've switched to ruamel.yaml, we don't need to strip
comments. Stop stripping them. Intra-list comments aren't
supported, so just remove them.

Please don't ask me why we can't have a space before openstack-merlin.

Change-Id: I72776774eabd4e397ee5e8bdd58b3632be8fd3a1
2019-04-10 13:33:51 +00:00
Andreas Jaeger
6c0aacfd46 Add small message to explain check-channels-yaml.sh
Add echo to explain what this test does.

Change-Id: I7c43c287125e70b7dc89deeed22bf6a9208b4c54
2016-10-18 22:43:43 +02:00
Clint Adams
952bc590ba Test formatting of gerritbot/channels.yaml
Ensure that the output of tools/normalize_channels_yaml.py matches
gerritbot/channels.yaml modulo any comments.

Change-Id: I3147cb094a795aeeffcceda182d065ed5145c2dd
Depends-On: Ia710997f37e8fba4a18b26577ecac42dd3137e2a
2015-09-29 09:56:18 -04:00