The original VMCreateError exception arguments are incorrect.
And actually these 2 places should raise a VMConfigMissingError.

Signed-off-by: Qingtang Zhou <[email protected]>
---
 virttest/qemu_vm.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
index 0250efb..8b1ddb0 100644
--- a/virttest/qemu_vm.py
+++ b/virttest/qemu_vm.py
@@ -1768,11 +1768,13 @@ class VM(virt_vm.BaseVM):
                 proxy_helper_cmd =  utils_misc.get_path(root_dir,
                                                         proxy_helper_name)
                 if not proxy_helper_cmd:
-                    raise virt_vm.VMCreateError("Proxy command not specified")
+                    raise virt_vm.VMConfigMissingError(self.name,
+                                                       "9p_proxy_binary")
 
                 p9_export_dir = params.get("9p_export_dir")
                 if not p9_export_dir:
-                    raise virt_vm.VMCreateError("Export dir not specified")
+                    raise virt_vm.VMConfigMissingError(self.name,
+                                                       "9p_export_dir")
 
                 proxy_helper_cmd += " -p " + p9_export_dir
                 proxy_helper_cmd += " -u 0 -g 0"
-- 
1.8.1.4

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to