Skip to content

Commit

Permalink
Merge pull request #27937 from DSRCompany/issues/23373_highstate_outp…
Browse files Browse the repository at this point in the history
…ut_error

Bugfix for highstate return data handler.
  • Loading branch information
Mike Place committed Oct 14, 2015
2 parents 24c58ab + 0941522 commit ac1717e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions salt/output/highstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,17 @@ def _format_host(host, data):
.format(hcolor, err, colors)))
if isinstance(data, dict):
# Verify that the needed data is present
data_tmp = {}
for tname, info in six.iteritems(data):
if isinstance(info, dict) and '__run_num__' not in info:
err = (u'The State execution failed to record the order '
'in which all states were executed. The state '
'return missing data is:')
hstrs.insert(0, pprint.pformat(info))
hstrs.insert(0, err)
if isinstance(info, dict) and 'result' in info:
data_tmp[tname] = info
data = data_tmp
# Everything rendered as it should display the output
for tname in sorted(
data,
Expand Down

0 comments on commit ac1717e

Please sign in to comment.