Don't try to redefine xml if hotplug/hotunplug succeeds

This commit is contained in:
Cole Robinson 2008-08-22 18:29:50 -04:00
parent 7bd37f6d0e
commit d0620005a3
2 changed files with 7 additions and 0 deletions

View File

@ -535,6 +535,10 @@ class vmmAddHardware(gobject.GObject):
"reboot.")):
return
if self.vm.is_active() and not attach_err:
# Attach device should alter xml for us
return
try:
self.vm.add_device(xml)
except Exception, e:

View File

@ -1684,6 +1684,9 @@ class vmmDetails(gobject.GObject):
"reboot.")):
return
if self.vm.is_active() and not detach_err:
return
try:
self.vm.remove_device(xml)
except Exception, e: