Returns the content of standard output returned by invoking |cmdlist|. Raises |GypError| if the command return with a non-zero return code.
(cmdlist)
| 1564 | |
| 1565 | |
| 1566 | def GetStdout(cmdlist): |
| 1567 | """Returns the content of standard output returned by invoking |cmdlist|. |
| 1568 | Raises |GypError| if the command return with a non-zero return code.""" |
| 1569 | job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE) |
| 1570 | out = job.communicate()[0].decode("utf-8") |
| 1571 | if job.returncode != 0: |
| 1572 | sys.stderr.write(out + "\n") |
| 1573 | raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) |
| 1574 | return out.rstrip("\n") |
| 1575 | |
| 1576 | |
| 1577 | def MergeGlobalXcodeSettingsToSpec(global_dict, spec): |
no test coverage detected