All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][PATCH] recipes: python3 fixes
@ 2016-10-08  4:36 Denys Dmytriyenko
  0 siblings, 0 replies; only message in thread
From: Denys Dmytriyenko @ 2016-10-08  4:36 UTC (permalink / raw)
  To: meta-ti

From: Denys Dmytriyenko <denys@ti.com>

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 recipes-kernel/linux/setup-defconfig.inc | 2 +-
 recipes-ti/includes/ti-unpack.inc        | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
index 7faf7f2..dcf2ada 100644
--- a/recipes-kernel/linux/setup-defconfig.inc
+++ b/recipes-kernel/linux/setup-defconfig.inc
@@ -4,7 +4,7 @@ def get_git_revision(p):
     import subprocess
 
     try:
-        return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE).communicate()[0].rstrip()
+        return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip()
     except OSError:
         return None
 
diff --git a/recipes-ti/includes/ti-unpack.inc b/recipes-ti/includes/ti-unpack.inc
index 9101044..1922db6 100644
--- a/recipes-ti/includes/ti-unpack.inc
+++ b/recipes-ti/includes/ti-unpack.inc
@@ -17,7 +17,6 @@ python do_unpack () {
 
 TI_BIN_UNPK_WDEXT ?= ""
 python ti_bin_do_unpack() {
-
     import os
 
     # InstallJammer requires 32bit version of glibc
@@ -48,11 +47,11 @@ python ti_bin_do_unpack() {
     cmd_list = cmd_string.split( ":" )
 
     # Make the InstallJammer binary executable so we can run it
-    os.chmod(binfile, 0755)
+    os.chmod(binfile, 0o755)
 
     # Run the InstallJammer binary and accept the EULA
     filename = "HOME=%s ./%s %s" % (workdir, binfile, arg_string)
-    
+
     # Test executable by printing installer version or help screen (--version currently broken for some installers) 
     # - this is currently broken in some IJ installers - comment out for now
     #if os.system(filename + " --version") != 0:
@@ -74,10 +73,9 @@ python ti_bin_do_unpack() {
         tarfile  = bb.data.expand(tarfile, localdata)
         tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir)
         if os.system(tcmd) != 0:
-            print "ERROR: ti-eula-unpack: failed to extract tarfile"
+            print("ERROR: ti-eula-unpack: failed to extract tarfile")
             raise bb.build.FuncFailed()
 
     # Return to the previous directory
     os.chdir(save_cwd)
 }
-
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-08  4:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-08  4:36 [master][PATCH] recipes: python3 fixes Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.