MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _call_proc

Function _call_proc

pager_lib/getmac/getmac.py:272–287  ·  view source on GitHub ↗
(executable, args)

Source from the content-addressed store, hash-verified

270
271
272def _call_proc(executable, args):
273 # type: (str, str) -> str
274 if WINDOWS:
275 cmd = executable + " " + args # type: ignore
276 else:
277 cmd = [executable] + shlex.split(args) # type: ignore
278
279 output = check_output(cmd, stderr=DEVNULL, env=ENV)
280
281 if DEBUG >= 4:
282 log.debug("Output from '%s' command: %s", executable, str(output))
283
284 if not PY2 and isinstance(output, bytes):
285 return str(output, "utf-8")
286 else:
287 return str(output)
288
289
290def _uuid_convert(mac):

Callers 1

_popenFunction · 0.85

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected