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)
| 402 | |
| 403 | |
| 404 | def 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 | |
| 423 | def check_output(*popenargs, timeout=None, **kwargs): |
no test coverage detected
searching dependent graphs…