[gnome-continuous-yocto/gnomeostree-3.28-rocko: 317/8267] oeqa: Print function python3 fixes



commit ca2edae7c3585204a11f6d9d69351d37880bf761
Author: Richard Purdie <richard purdie linuxfoundation org>
Date:   Sun May 15 10:23:25 2016 +0100

    oeqa: Print function python3 fixes
    
    Use print functions for comptibility with python3.
    
    (From OE-Core rev: 0c89a8a276b67a9292ee3100003c789126bd9ea9)
    
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/lib/oeqa/runtime/connman.py       |    2 +-
 meta/lib/oeqa/runtime/parselogs.py     |    2 +-
 meta/lib/oeqa/selftest/esdk_prepare.py |    8 ++++----
 meta/lib/oeqa/selftest/sstatetests.py  |   10 +++++-----
 4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py
index bd9dba3..003fefe 100644
--- a/meta/lib/oeqa/runtime/connman.py
+++ b/meta/lib/oeqa/runtime/connman.py
@@ -27,5 +27,5 @@ class ConnmanTest(oeRuntimeTest):
     def test_connmand_running(self):
         (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
         if status != 0:
-            print self.service_status("connman")
+            print(self.service_status("connman"))
             self.fail("No connmand process running")
diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py
index dec9ebe..a936601 100644
--- a/meta/lib/oeqa/runtime/parselogs.py
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -262,7 +262,7 @@ class ParseLogsTest(oeRuntimeTest):
         self.write_dmesg()
         log_list = self.get_local_log_list(self.log_locations)
         result = self.parse_logs(self.errors, self.ignore_errors, log_list)
-        print self.getHardwareInfo()
+        print(self.getHardwareInfo())
         errcount = 0
         for log in result:
             self.msg += "Log: "+log+"\n"
diff --git a/meta/lib/oeqa/selftest/esdk_prepare.py b/meta/lib/oeqa/selftest/esdk_prepare.py
index 1b36a0d..4060897 100755
--- a/meta/lib/oeqa/selftest/esdk_prepare.py
+++ b/meta/lib/oeqa/selftest/esdk_prepare.py
@@ -28,8 +28,8 @@ class ExtSdkPrepareTest(unittest.TestCase):
             # load module under test
             self.test_mod = imp.load_source("", module_dest_path)
         except:
-            print "error: unable to copy or load %s [src: %s, dst: %s]" % \
-                    (module_file_name, module_path, module_dest_path)
+            print("error: unable to copy or load %s [src: %s, dst: %s]" % \
+                    (module_file_name, module_path, module_dest_path))
             sys.exit(1)
 
     def test_prepare_unexpected(self):
@@ -66,8 +66,8 @@ if __name__ == '__main__':
         unittest.TextTestRunner().run(suite)
     else:
         progname = os.path.basename(sys.argv[0])
-        print "%s: missing directory path" % progname
-        print "usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname
+        print("%s: missing directory path" % progname)
+        print("usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname)
         sys.exit(1)
 else:
     # running under oe-selftest
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index ad59146..a1e5d33 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -454,14 +454,14 @@ http_proxy = "http://example.com/";
 
         for k in files1.viewkeys() | files2.viewkeys():
             if k in files1 and k in files2:
-                print "%s differs:" % k
-                print subprocess.check_output(("bitbake-diffsigs",
+                print("%s differs:" % k)
+                print(subprocess.check_output(("bitbake-diffsigs",
                                                topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
-                                               topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + 
files2[k]))
+                                               topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + 
files2[k])))
             elif k in files1 and k not in files2:
-                print "%s in files1" % k
+                print("%s in files1" % k)
             elif k not in files1 and k in files2:
-                print "%s in files2" % k
+                print("%s in files2" % k)
             else:
                 assert "shouldn't reach here"
         self.fail("sstate hashes not identical.")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]