Factored polling std{out,err} reads into a function
Factored polling std{out,err} reads into a function

The process to poll for data in the stdout and/or stderr pipes during a
low-level command execution was repetitive. Factoring this out into a
function DRYs out the code.

Signed-off-by: Steve Kuznetsov <a7da0fca91d9933d2725d731a48cabdc9e8ffd7a@redhat.com>

thaim/ansible,thaim/ansible