[virt-tools-list] [PATCH 05/10] choosecd: Emit cdrom-chosen signal after the dialog has been closed

Povilas Kanapickas povilas at radix.lt
Sat Sep 1 22:22:49 UTC 2018


This fixes the testChooseCDHotplug UI test: the cdrom-chosen signal
opens an alert and it does not get focus because it's being opened
before the dialog is closed. As a result, the tests timeout waiting for
the alert to get focus. Emitting the signal after the closure of the
dialog fixes this issue.

Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
---
 virtManager/choosecd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtManager/choosecd.py b/virtManager/choosecd.py
index e8eb891f..2de71315 100644
--- a/virtManager/choosecd.py
+++ b/virtManager/choosecd.py
@@ -116,8 +116,8 @@ class vmmChooseCD(vmmGObjectUI):
         except Exception as e:
             return self.err.val_err(_("Invalid Media Path"), e)
 
-        self.emit("cdrom-chosen", self.disk, path)
         self.close()
+        self.emit("cdrom-chosen", self.disk, path)
 
     def media_toggled(self, ignore1=None, ignore2=None):
         is_phys = bool(self.widget("physical-media").get_active())
-- 
2.17.1





More information about the virt-tools-list mailing list