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

Function runCommand

Mac/BuildScript/build-installer.py:520–533  ·  view source on GitHub ↗

Run a command and raise RuntimeError if it fails. Output is suppressed unless the command fails.

(commandline)

Source from the content-addressed store, hash-verified

518 return open(fn, 'r').read()
519
520def runCommand(commandline):
521 """
522 Run a command and raise RuntimeError if it fails. Output is suppressed
523 unless the command fails.
524 """
525 fd = os.popen(commandline, 'r')
526 data = fd.read()
527 xit = fd.close()
528 if xit is not None:
529 sys.stdout.write(data)
530 raise RuntimeError("command failed: %s"%(commandline,))
531
532 if VERBOSE:
533 sys.stdout.write(data); sys.stdout.flush()
534
535def captureCommand(commandline):
536 fd = os.popen(commandline, 'r')

Callers 8

build_openssl_archFunction · 0.85
build_universal_opensslFunction · 0.85
buildRecipeFunction · 0.85
buildPythonDocsFunction · 0.85
buildPythonFunction · 0.85
packageFromRecipeFunction · 0.85
buildDMGFunction · 0.85
setIconFunction · 0.85

Calls 4

readMethod · 0.45
closeMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…