[oe-commits] [openembedded-core] 03/08: devtool: open kconfig fragment in binary mode

git at git.openembedded.org git at git.openembedded.org
Tue Mar 28 07:43:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 72bec63ab0e78753fb6ed1794d11beef9485c014
Author: Stephano Cetola <stephano.cetola at linux.intel.com>
AuthorDate: Mon Mar 27 10:01:36 2017 -0700

    devtool: open kconfig fragment in binary mode
    
    When devtool writes to the kconfig fragment, it writes the output of
    the diff command returned from pipe.communicate(). This function
    returns binary objects. We should open the kconfig fragment file in
    binary mode if we expect to write binary objects to it.
    
    [YOCTO #11171]
    
    Signed-off-by: Stephano Cetola <stephano.cetola at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/standard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 07c1400..ffca2c9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1223,7 +1223,7 @@ def _create_kconfig_diff(srctree, rd, outfile):
         stdout, stderr = pipe.communicate()
         if pipe.returncode == 1:
             logger.info("Updating config fragment %s" % outfile)
-            with open(outfile, 'w') as fobj:
+            with open(outfile, 'wb') as fobj:
                 fobj.write(stdout)
         elif pipe.returncode == 0:
             logger.info("Would remove config fragment %s" % outfile)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list