[libvirt] [PATCH 1/4] python: global variable and debugging improvement for generator.py

Eric Blake eblake at redhat.com
Thu Feb 28 22:05:35 UTC 2013


On 02/28/2013 03:03 AM, Guannan Ren wrote:
> * Put import clause in front of global variables
> * Sink __name__ == "__main__" to the bottom of this script and
>   support "import generator"
> * Remove "quiet" and "debug" global variables and use
>   stubs_buiding_debug and xml_parsing_debug variable instead

s/buiding/building/

> ---
>  python/generator.py | 105 +++++++++++++++++++++++++++-------------------------
>  1 file changed, 54 insertions(+), 51 deletions(-)
> 

>  
> -    if not quiet:
> +    if stubs_buiding_debug:

and here, as well

> +
> +    if buildStubs("libvirt", stubs_buiding_debug, xml_parsing_debug) < 0:
> +        sys.exit(1)
> +    if buildStubs("libvirt-lxc", stubs_buiding_debug, xml_parsing_debug) < 0:
> +        sys.exit(1)
> +    if buildStubs("libvirt-qemu", stubs_buiding_debug, xml_parsing_debug) < 0:
> +        sys.exit(1)

And here.

My python is too weak to say whether this makes sense, especially not
whether it makes sense for 1.0.3 or whether it should wait until after
the release.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130228/e47ed665/attachment-0001.sig>


More information about the libvir-list mailing list