[virt-tools-list] [PATCH 1/4] Add inspection thread.

Richard W.M. Jones rjones at redhat.com
Mon Jul 18 18:41:17 UTC 2011


On Mon, Jul 18, 2011 at 02:32:42PM -0400, Cole Robinson wrote:
> product_variant will be unset if this function raises attributeerror. You'll
> need to just product_variant = None before hand.

Hmmm, so it will.  I'll fix it.

> Additionally, rather than do the exception check, I'd prefer something
> explicit like
> 
> if hasattr(g, "inspect_get_product_variant")

Ah, didn't know about this.  It's a good idea.

> since the bindings could conceivably raise an attribute error deeper in the
> call and we would false positive.
> 
> As a general note, this series raised some warnings from 'make check-pylint'.
> Please make sure pylint and python-pep8 are installed, and run that command
> before submitting. It's okay if each individual patch isn't clean, since this
> patch will give some 'unused variable' warnings until patch 2.

Yup.  I did run this before, but I ran it again now and noticed
some more warnings, so I'll fix those in v4.

Thanks for looking,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the virt-tools-list mailing list