Don't try to redefine xml if hotplug/hotunplug succeeds
This commit is contained in:
parent
7bd37f6d0e
commit
d0620005a3
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue