On 06/05/2012 11:42 PM, guyanhua wrote: > > Modify the virsh_cmd function by adding a param ignore_status with False > default > and returning cmd_result dirctly. Besides that, the virsh_cmd callers have > been > fixed accordingly. > > ps: Under your proposal,I have made the corresponding changes, some calling > functions > have been modified. And i will keep on fixing it. If you find something > needs to > be fixed, please tell me, thanks! > > Signed-off-by: Gu Yanhua<guyanhua-f...@cn.fujitsu.com>
Yes, thinking about this more now, I do think modifying the virsh_cmd return is the better option. It's more flexible and would be much more difficult to change later. I'm hoping there aren't too many users of this function outside of virsh_*() Having ".stdout.strip()" all over the place looks weird to me. Can we reduce number of changes and duplication by putting the .stdout.strip() just in the medium-level functions, like virsh_domstate() and virsh_uri()? I think this would help hide the return change from high-level VM methods, yes? Thanks for helping improve virsh_cmd! -- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest