From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 08/17] KVM test: let kvm_vm.create_image() raise a CmdError if qemu-img fails Date: Mon, 3 Jan 2011 20:27:09 +0200 Message-ID: <1294079238-21239-8-git-send-email-mgoldish@redhat.com> References: <1294079238-21239-1-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1294079238-21239-1-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Signed-off-by: Michael Goldish --- 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