From patchwork Mon Apr 12 08:32:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Yang X-Patchwork-Id: 92017 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3C8WJsJ008910 for ; Mon, 12 Apr 2010 08:32:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752756Ab0DLIcR (ORCPT ); Mon, 12 Apr 2010 04:32:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40544 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372Ab0DLIcQ (ORCPT ); Mon, 12 Apr 2010 04:32:16 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3C8WEvL008823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Apr 2010 04:32:15 -0400 Received: from localhost.localdomain ([10.66.91.72]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3C8WCs5029791; Mon, 12 Apr 2010 04:32:13 -0400 From: Feng Yang To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Feng Yang Subject: [PATCH] KVM Test: Fix bug that check_image.py will check removed image. Date: Mon, 12 Apr 2010 16:32:12 +0800 Message-Id: <1271061132-1008-1-git-send-email-fyang@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 12 Apr 2010 08:32:45 +0000 (UTC) diff --git a/client/tests/kvm/scripts/check_image.py b/client/tests/kvm/scripts/check_image.py index 4056fb8..de163e7 100755 --- a/client/tests/kvm/scripts/check_image.py +++ b/client/tests/kvm/scripts/check_image.py @@ -77,6 +77,9 @@ class ImageCheck(object): # Check all the image in list. errmsg = [] for image_path in self.image_path_list: + if not os.path.exists(image_path): + print "Image %s does not exist!" % image_path + continue s, o = self.exec_img_cmd('info', image_path) if not s: errmsg.append(o)