MCPcopy Create free account
hub / github.com/ARMmbed/mbed-cli / pquery

Function pquery

test/util.py:36–44  ·  view source on GitHub ↗
(command, stdin=None, **kwargs)

Source from the content-addressed store, hash-verified

34 raise ProcessException(proc.returncode)
35
36def pquery(command, stdin=None, **kwargs):
37 print(' '.join(command))
38 proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
39 stdout, _ = proc.communicate(stdin)
40
41 if proc.returncode != 0:
42 raise ProcessException(proc.returncode)
43
44 return stdout.decode("utf-8")
45
46# Directory navigation
47@contextlib.contextmanager

Callers 2

assertlsFunction · 0.70
testreposFunction · 0.70

Calls 1

ProcessExceptionClass · 0.70

Tested by

no test coverage detected