[OE-core] [PATCH 11/15] insane: Open file in binary mode

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 7 12:56:03 UTC 2013


We open the file we're writing to in binary mode so open the input stream with the
same mode so things match. This avoids errors with python3.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/insane.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 271e9ff..c5d8ad9 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -578,7 +578,7 @@ def package_qa_check_license(workdir, d):
         if (not beginline) and (not endline):
             md5chksum = bb.utils.md5_file(srclicfile)
         else:
-            fi = open(srclicfile, 'r')
+            fi = open(srclicfile, 'rb')
             fo = tempfile.NamedTemporaryFile(mode='wb', prefix='poky.', suffix='.tmp', delete=False)
             tmplicfile = fo.name;
             lineno = 0
-- 
1.7.10.4





More information about the Openembedded-core mailing list