MCPcopy Index your code
hub / github.com/saltstack/salt / exec_nb_cmd

Method exec_nb_cmd

salt/client/ssh/shell.py:314–334  ·  view source on GitHub ↗

Yield None until cmd finished

(self, cmd)

Source from the content-addressed store, hash-verified

312 yield ("", "Unknown Error", None)
313
314 def exec_nb_cmd(self, cmd):
315 """
316 Yield None until cmd finished
317 """
318 r_out = []
319 r_err = []
320 rcode = None
321 cmd = self._cmd_str(cmd)
322
323 logmsg = f"Executing non-blocking command: {cmd}"
324 if self.passwd:
325 logmsg = logmsg.replace(self.passwd, ("*" * 6))
326 log.debug(logmsg)
327
328 for out, err, rcode in self._run_nb_cmd(cmd):
329 if out is not None:
330 r_out.append(out)
331 if err is not None:
332 r_err.append(err)
333 yield None, None, None
334 yield "".join(r_out), "".join(r_err), rcode
335
336 def exec_cmd(self, cmd):
337 """

Callers

nothing calls this directly

Calls 4

_cmd_strMethod · 0.95
_run_nb_cmdMethod · 0.95
debugMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected