MCPcopy Index your code
hub / github.com/python/cpython / check_call

Function check_call

Lib/subprocess.py:404–420  ·  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. Example:

(*popenargs, **kwargs)

Source from the content-addressed store, hash-verified

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

Callers 3

make_cert_keyFunction · 0.85
make_caFunction · 0.85
make_ssl_certs.pyFile · 0.85

Calls 3

CalledProcessErrorClass · 0.85
callFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…