[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1771/8267] package: correct subprocess.Popen.communicate() return values



commit 6f2fa0a0186e5bfb823ed033ba4a7fcfff2c7834
Author: Vladimir Zapolskiy <vz mleia com>
Date:   Sat Aug 6 04:43:29 2016 +0300

    package: correct subprocess.Popen.communicate() return values
    
    This is a non-functional change, which intends to correct element
    names of a tuple returned by Popen.communicate().
    
    Both in python2 and python3 subprocess.Popen.communicate() method
    returns a tuple (stdoutdata, stderrdata), thus old assignments and
    collateral comments are incorrect from human's point of view, however
    formally there is no error in the code.
    
    The change is desired to have to avoid copy-paste errors in future.
    
    (From OE-Core rev: cdd9bae381deb15ac84e11a39f9d72f2757c1583)
    
    Signed-off-by: Vladimir Zapolskiy <vz mleia com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/classes/package.bbclass |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 6aed4ca..d0b2db6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1579,19 +1579,19 @@ python package_do_shlibs() {
         if file.endswith('.dylib') or file.endswith('.so'):
             rpath = []
             p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
-            err, out = p.communicate()
-            # If returned successfully, process stderr for results
+            out, err = p.communicate()
+            # If returned successfully, process stdout for results
             if p.returncode == 0:
-                for l in err.split("\n"):
+                for l in out.split("\n"):
                     l = l.strip()
                     if l.startswith('path '):
                         rpath.append(l.split()[1])
 
         p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
-        err, out = p.communicate()
-        # If returned successfully, process stderr for results
+        out, err = p.communicate()
+        # If returned successfully, process stdout for results
         if p.returncode == 0:
-            for l in err.split("\n"):
+            for l in out.split("\n"):
                 l = l.strip()
                 if not l or l.endswith(":"):
                     continue


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