def _set_retcode(ret):
 __context__['retcode'] = 0
 if isinstance(ret, list):
  __context__['retcode'] = 1
  return
 if (not salt.utils.check_state_result(ret)):
  __context__['retcode'] = 2

def _set_retcode ( ret ) : __context__ [ 'retcode' ] = 0 if isinstance ( ret , list ) : __context__ [ 'retcode' ] = 1 return if ( not salt . utils . check_state_result ( ret ) ) : __context__ [ 'retcode' ] = 2
set the return code based on the data back from the state system .