Files
virt-manager/2099a194-reset-guest-domain-to-none-on-domain-creation-error.patch
Charles Arnold 558728377c - bsc#1027942 - virt-manager: Missing upstream bug fixes
f5d709d9-lang-it-1.patch
  c66098f3-lang-it-2.patch
  452a693e-lang-update.patch
  6b5106ea-lang-it-ko-fix.patch
  9c8ffe51-fix-multiple-warnings-1.patch
  cb182f7e-skip-authentication-only-for-VNC-with-listen-type-none.patch
  0610cd6a-ensure-bool-value-used-for-set_sensitive-call.patch
  f341352c-remove-redundant-error-string.patch
  ff3b4dc5-dont-overwrite-install-bootorder.patch
  2099a194-reset-guest-domain-to-none-on-domain-creation-error.patch
  7aee124d-fix-multiple-warnings-2.patch

- Check for SLE15 and Leap 15 bsc#1035779 
  virtman-default-guest-from-host-os.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=348
2017-04-27 20:58:57 +00:00

36 lines
1.5 KiB
Diff

Subject: Reset Guest.domain to None on domain creation error
From: Christophe Fergeau cfergeau@redhat.com Thu Apr 13 11:18:46 2017 +0200
Date: Thu Apr 13 14:24:40 2017 -0400:
Git: 2099a1946e22b62d31b954dc3e7b813404c2d019
When an error occurs when the VM creation wizard tries to start the VM,
it's then not possible to press again the "Finish" button to try again
to start it, as this errors out with:
Traceback (most recent call last):
File "/home/teuf/redhat/virt/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/home/teuf/redhat/virt/virt-manager/virtManager/create.py", line 2341, in _do_async_install
guest.start_install(meter=meter)
File "/home/teuf/redhat/virt/virt-manager/virtinst/guest.py", line 457, in start_install
raise RuntimeError(_("Domain has already been started!"))
RuntimeError: Domain has already been started!
This is caused by code introduced in commit fc6778 which does not reset
self.domain to None when an exception is caught.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index c8c3d14c..39975199 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -408,6 +408,7 @@ class Guest(XMLBuilder):
exc_info = sys.exc_info()
try:
self.domain.undefine()
+ self.domain = None
except:
pass
raise exc_info[0], exc_info[1], exc_info[2]