galaxy info displayed 'galaxy_info' section wrong

The output of 'ansible-galaxy info' was formatting the
'galaxy_info' key with one char per line.

Previously, when building the output string, items in
role_info that had a dict for value, the label for
it's key ('galaxy_info' for ex) was being added to
the text list in addition to being appended. Only
the append is needed.

Also added a unit test in test/units/cli/test_galaxy.py,
but skip it on py3 until galaxy is py3 compatible.

fixes #15177
This commit is contained in:
Adrian Likins 2016-03-26 03:22:37 -04:00
parent 4c3c294a03
commit 1468538414
3 changed files with 53 additions and 1 deletions

View file

@ -152,7 +152,6 @@ class GalaxyCLI(CLI):
continue
if isinstance(role_info[k], dict):
text += "\t%s: \n" % (k)
text.append(u"\t%s:" % (k))
for key in sorted(role_info[k].keys()):
if key in self.SKIP_INFO_KEYS: