[Libvirt-cim] [PATCH] [TEST] #3 Add -d to duplicate error output to stderr

Zhengang Li zli at linux.vnet.ibm.com
Wed Apr 16 02:42:54 UTC 2008


zli at linux.vnet.ibm.com wrote:

> .#3:
> - Fix the bug that ignore bugs if no -d is specified.


> @@ -119,6 +134,7 @@ def do_main(types=['Xen'], p=parser):
>          else:
>              def do_try():
>                  try:
> +                    log_param(options.debug==True)
This is the only line .#3 changed.
The parser doesn't assign a 'False' value to options.debug if no -d is 
specified.

So we have three case:
1. log_param() in test case, debug is 'None'
2. log_param(debug) in do_try(), and -d is specified, debug is 'True'
3. log_param(debug) in do_try(), and no -d is specified, debug is 'False'

>                      from VirtLib.utils import setup_ssh_key
>                      from XenKvmLib.test_doms import destroy_and_undefine_all
>                      setup_ssh_key()



-- 
- Zhengang




More information about the Libvirt-cim mailing list