diff mbox

KVM Test: Fix bug that check_image.py will check removed image.

Message ID 1271061132-1008-1-git-send-email-fyang@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Feng Yang April 12, 2010, 8:32 a.m. UTC
None
diff mbox

Patch

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)