diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-09-25 09:32:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-26 16:37:55 +0100 |
commit | 5b5e1b90087bf4aab7b52fd0676fe7a30db84bfe (patch) | |
tree | 05d63617898d58a5d7f87f4ecd9b3eb2c9fc7437 /meta/recipes-extended/shadow | |
parent | c54076ed8ae5c82d13a7edf4a14cbc1bb6eac658 (diff) | |
download | poky-5b5e1b90087bf4aab7b52fd0676fe7a30db84bfe.tar.gz |
relocate_sdk.py: make it work also with python 3
Strings in Python 3, by default, are assumed to contain unicode
characters. In previous versions of python (<3), unicode strings are
explicitly declared with u"abc". If not, than they're automatically
converted to bytes. This doesn't happen anymore in Python 3.
Since we're dealing with binary files, opened in byte mode, make sure
that we explicitly convert all strings to bytes to make both python 2
and 3 happy.
Other changes:
* add a safety check to make sure relocation did not change the file
size;
* a couple of cosmetic changes (wrap long lines so that we don't have
to scroll to reach the end of them);
(From OE-Core rev: 175f20e27eadc79df16109961f5ce6232705e96f)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow')
0 files changed, 0 insertions, 0 deletions