[et-mgmt-tools] [PATCH] virt-manager: small exception handling fix
Hugh Brock
hbrock at redhat.com
Wed Oct 10 15:32:45 UTC 2007
Andy Grover wrote:
> Hi,
>
> This patch fixes exception handling slightly in virt-manager.
>
> Thanks -- Andy
>
> diff -r 334e563e54c9 src/virtManager/domain.py
> --- a/src/virtManager/domain.py Sat Oct 06 16:14:45 2007 -0400
> +++ b/src/virtManager/domain.py Tue Oct 09 15:51:16 2007 -0700
> @@ -681,7 +681,7 @@ class vmmDomain(gobject.GObject):
> try:
> if self.is_active():
> self.vm.attachDevice(xml)
> - except libvirtError, e:
> + except libvirt.libvirtError, e:
> device_exception = str(e)
>
> index = vmxml.find("</devices>")
> @@ -703,7 +703,7 @@ class vmmDomain(gobject.GObject):
> if self.is_active():
> try:
> self.vm.detachDevice(dev_xml)
> - except libvirtError, e:
> + except libvirt.libvirtError, e:
> device_exception = str(e)
>
> # then the stored XML
>
Thanks for this, I'll add it shortly...
--Hugh
--
Red Hat Virtualization Group http://redhat.com/virtualization
Hugh Brock | virt-manager http://virt-manager.org
hbrock at redhat.com | virtualization library http://libvirt.org
More information about the et-mgmt-tools
mailing list