popen¶
- getmac.utils.popen(command, args)[source]¶
Execute a command with arguments and return the stdout (stderr is discarded).
Wrapper around
getmac.utils.call_proc(), with checks to ensure the command exists and is executable and some debug logging. This should be used instead ofgetmac.utils.call_proc().- Parameters:
- Return type:
- Returns:
stdout from the command (stderr is discarded)
- Raises:
CalledProcessError – the command failed to execute
TimeoutExpired – the command took longer than
COMMAND_TIMEOUTseconds, and was stopped