]> code.ossystems Code Review - openembedded-core.git/commit
relocate_sdk.py: Allow script to work with Python 2.4 and 3.
authorKonrad Scherer <Konrad.Scherer@windriver.com>
Thu, 17 Oct 2013 14:17:20 +0000 (10:17 -0400)
committerRobert Yang <liezhi.yang@windriver.com>
Wed, 11 Dec 2013 02:12:20 +0000 (21:12 -0500)
commit343127f2f81be337596d3eacbbc92278e82ce574
tree684c2747e7c929d2a89f4680a19d03ccf5f91f0b
parentc2baac739a521d1edd408a24f6b1fece8f755218
relocate_sdk.py: Allow script to work with Python 2.4 and 3.

Python 2.4 does not support the 'b' string literal or the
keyword 'as' in exception handling. Python 3 does not accept
the old method of exception handling and defaults to unicode.
The b() function converts strings to bytes on Python 3 and
using sys.exc_info() avoids the exception handling syntax.

(From OE-Core master rev: 1e2ec5f576f167673d7980737826987fefdc74a9)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
scripts/relocate_sdk.py