]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 26 Oct 2013 14:53:25 +0000 (15:53 +0100)
commit1e2ec5f576f167673d7980737826987fefdc74a9
treed40921ea85e675358e2d5cba35ece24290f3a21b
parent39383e9bf1aa5e29d33d8af7f8e690d2238fd14f
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.

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/relocate_sdk.py