MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / check_call

Function check_call

tools/python-3.11.9-amd64/Lib/subprocess.py:398–414  ·  view source on GitHub ↗

Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Exa

(*popenargs, **kwargs)

Source from the content-addressed store, hash-verified

396
397
398def check_call(*popenargs, **kwargs):
399 """Run command with arguments. Wait for command to complete. If
400 the exit code was zero then return, otherwise raise
401 CalledProcessError. The CalledProcessError object will have the
402 return code in the returncode attribute.
403
404 The arguments are the same as for the call function. Example:
405
406 check_call(["ls", "-l"])
407 """
408 retcode = call(*popenargs, **kwargs)
409 if retcode:
410 cmd = kwargs.get("args")
411 if cmd is None:
412 cmd = popenargs[0]
413 raise CalledProcessError(retcode, cmd)
414 return 0
415
416
417def check_output(*popenargs, timeout=None, **kwargs):

Callers 1

Calls 3

CalledProcessErrorClass · 0.85
callFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected