def _get_supervisorctl_bin(bin_env):
 cmd = 'supervisorctl'
 if (not bin_env):
  which_result = __salt__['cmd.which_bin']([cmd])
  if (which_result is None):
   raise CommandNotFoundError('Could not find a `{0}` binary'.format(cmd))
  return which_result
 if os.path.isdir(bin_env):
  cmd_bin = os.path.join(bin_env, 'bin', cmd)
  if os.path.isfile(cmd_bin):
   return cmd_bin
  raise CommandNotFoundError('Could not find a `{0}` binary'.format(cmd))
 return bin_env

def _get_supervisorctl_bin ( bin_env ) : cmd = 'supervisorctl' if ( not bin_env ) : which_result = __salt__ [ 'cmd.which_bin' ] ( [ cmd ] ) if ( which_result is None ) : raise CommandNotFoundError ( 'Could not find a `{0}` binary' . format ( cmd ) ) return which_result if os . path . isdir ( bin_env ) : cmd_bin = os . path . join ( bin_env , 'bin' , cmd ) if os . path . isfile ( cmd_bin ) : return cmd_bin raise CommandNotFoundError ( 'Could not find a `{0}` binary' . format ( cmd ) ) return bin_env
return supervisorctl command to call .