[KVM-AUTOTEST PATCH 08/17] KVM test: let kvm_vm.create_image() raise a CmdError if qemu-img fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/kvm_vm.py |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index c237fbe..32be55e 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -203,19 +203,8 @@ def create_image(params, root_dir):
     size = params.get("image_size", "10G")
     qemu_img_cmd += " %s" % size
 
-    try:
-        utils.system(qemu_img_cmd)
-    except error.CmdError, e:
-        logging.error("Could not create image; qemu-img command failed:\n%s",
-                      str(e))
-        return None
-
-    if not os.path.exists(image_filename):
-        logging.error("Image could not be created for some reason; "
-                      "qemu-img command:\n%s" % qemu_img_cmd)
-        return None
-
-    logging.info("Image created in %s" % image_filename)
+    utils.system(qemu_img_cmd)
+    logging.info("Image created in %r" % image_filename)
     return image_filename
 
 
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux