Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix highstate output

Refs #10945
  • Loading branch information...
commit 5f9c0bca49173531156cdddcf75b553bf41951e6 1 parent fc0b4b7
@cachedout cachedout authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 salt/output/highstate.py
View
12 salt/output/highstate.py
@@ -122,14 +122,20 @@ def _format_host(host, data):
if comps[1] != comps[2]:
state_lines.insert(
3, ' {tcolor} Name: {comps[2]}{colors[ENDC]}')
+ try:
+ comment = ret['comment'].strip().replace(
+ '\n',
+ '\n' + ' ' * 14)
+ except AttributeError:
+ comment = ret['comment'].join(' ').replace(
+ '\n',
+ '\n' + ' ' * 13)
svars = {
'tcolor': tcolor,
'comps': comps,
'ret': ret,
+ 'comment': comment,
# This nukes any trailing \n and indents the others.
- 'comment': ret['comment'].strip().replace(
- '\n',
- '\n' + ' ' * 14),
'colors': colors
}
hstrs.extend([sline.format(**svars) for sline in state_lines])
Please sign in to comment.
Something went wrong with that request. Please try again.