[libvirt] [libvirt-test-API][PATCH] Fix utils.exec_cmd output problem
Guannan Ren
gren at redhat.com
Wed Nov 27 06:37:35 UTC 2013
On 2013年11月27日 14:11, Jincheng Miao wrote:
> ----- Original Message -----
>> Why to append standard error to standard output. It is not right in
>> semantics.
> I think test-api should replace all commands modules with utils.exec_cmd.
> For commands modules, it merged stderr with stdout:
>
> def getstatusoutput(cmd):
> """Return (status, output) of executing cmd in a shell."""
> import os
> pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
>
> So for compatible, utils.exec_cmd should do the same thing.
>
Good idea, I will do the work soon.
Guannan
More information about the libvir-list
mailing list