[oe-commits] Richard Purdie : insane: Open file in binary mode
git at git.openembedded.org
git at git.openembedded.org
Thu May 9 08:42:03 UTC 2013
Module: openembedded-core.git
Branch: master-next
Commit: 2475e036d4259175a91c755360016ffb3c03fc7d
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2475e036d4259175a91c755360016ffb3c03fc7d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Tue May 7 13:56:03 2013 +0100
insane: Open file in binary mode
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 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 41007f8..809aa45 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
More information about the Openembedded-commits
mailing list