aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py')
-rw-r--r--tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
index 802e101147..2fa482414a 100644
--- a/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
+++ b/tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py
@@ -31,10 +31,10 @@ except ConsoleError, e:
status, output = traceCommand("xm block-attach %s file:/dev/NOT-EXIST xvda1 w" % domain.getName())
eyecatcher = "Error"
-where = output.find(eyecatcher)
+where = re.compile(eyecatcher, re.IGNORECASE).search(output)
if status == 0:
FAIL("xm block-attach returned bad status, expected non 0, status is: %i" % status )
-elif where == -1:
+elif where is None:
FAIL("xm block-attach returned bad output, expected Error, output is: %s" % output )
try: