Fix the highstate outputter if duration is not present

Happens for `onchanges` states and so forth

Fixes #25368
This commit is contained in:
Colton Myers 2015-07-22 11:55:52 -06:00
parent 40e9b07736
commit 940c798a5d

View File

@ -131,7 +131,7 @@ def _format_host(host, data):
# Increment result counts
rcounts.setdefault(ret['result'], 0)
rcounts[ret['result']] += 1
rdurations.append(ret['duration'])
rdurations.append(ret.get('duration', 0))
tcolor = colors['GREEN']
schanged, ctext = _format_changes(ret['changes'])