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.

(From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2013-05-07 13:56:03 +01:00
parent feeffdb5b6
commit e1b5647d2c

View File

@@ -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