Clean up stack trace when something goes wrong with minion output

Fixes #28010
This commit is contained in:
rallytime 2015-10-16 05:13:52 -06:00
parent f728307001
commit 0d7059e0c2

View file

@ -251,8 +251,12 @@ def state(
if mdata.get('failed', False):
m_state = False
else:
m_ret = mdata['ret']
m_state = salt.utils.check_state_result(m_ret)
try:
m_ret = mdata['ret']
except KeyError:
m_state = False
if not m_state:
m_state = salt.utils.check_state_result(m_ret)
if not m_state:
if minion not in fail_minions: