[Libvirt-cim] [PATCH 3 of 3] [TEST] IPv6 Support test

Sharad Mishra snmishra at us.ibm.com
Thu Dec 3 18:13:45 UTC 2009


> > +
> > +    except Exception, detail:
> > +        logger.error("Exception: %s", detail)
> > +        status = FAIL
>
> Instead of calling undefine before each call to raise Exception(), why
> not put the undefine call in the except block?  This means you'll only
> need to call undefine() once for any exception.  And if this test case
> is extended in the future, it'll safe guard against an accidental
> exclusion of the undefine() call when an exception occurs.

There is an exception raised if define fails. We don't want to call
undefine if the VM wasn't defined.

-Sharad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20091203/aa178f74/attachment.htm>


More information about the Libvirt-cim mailing list