diff mbox

Add support for python2.4 virtio_console.

Message ID 1290765500-5106-2-git-send-email-ldoktor@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lukáš Doktor Nov. 26, 2010, 9:58 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py
index d69c0a5..3edd051 100644
--- a/client/tests/kvm/tests/virtio_console.py
+++ b/client/tests/kvm/tests/virtio_console.py
@@ -102,7 +102,9 @@  def run_virtio_console(test, params, env):
             """
             @return: If any of subtest not pass return True.
             """
-            return True if self.failed > 0 else False
+            if self.failed > 0:
+                return True
+            return False
 
         def get_result(self):
             """
@@ -121,16 +123,20 @@  def run_virtio_console(test, params, env):
             for arg in result[2]:
                 sargs += str(arg) + ","
             sargs = sargs[:-1]
-            return ("Subtest (%s(%s)):  -->%s") % (result[1], sargs,
-                                             "PASS"if result[0] else "FAIL")
+            res = "FAIL"
+            if result[0]:
+                res = "PASS"
+            return ("Subtest (%s(%s)):  -->%s") % (result[1], sargs,res)
 
 
         def result_to_string(self, result):
             """
             @param result: Result of test.
             """
-            return ("Subtest (%s):  -->%s") % (result[1], "PASS"if result[0]
-                                                               else "FAIL")
+            res = "FAIL"
+            if result[0]:
+                res = "PASS"
+            return ("Subtest (%s):  -->%s") % (result[1], res)
 
 
         def get_full_text_result(self):