]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
bitbake: fix wrong usage of format_exc
authorEd Bartosh <eduard.bartosh@intel.com>
Fri, 10 Jun 2016 11:58:17 +0000 (14:58 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Jun 2016 10:51:07 +0000 (11:51 +0100)
commita9509949d7e2adba6e3cd89f97daa19a955855b5
tree94d5b42301e3ddb4e8de52f8cbcf664764349cd5
parent0219271d4130c1f4cf071c7577a4101c54c04921
bitbake: fix wrong usage of format_exc

First parameter of traceback.format_exc is a 'limit' - a number
of stracktraces to format.

Passing exception object to format_exc is incorrect, but it works in
Python 2 as this code from traceback module works:
    while tb is not None and (limit is None or n < limit):
Comparing integer counter n with the exception object in Python 2
always results in True. However, in Python 3 it throws exception:
    TypeError: unorderable types: int() < <Exception type>()

As format_exc is used in except block of handling another
exception this can cause hard to find and debug bugs.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py
lib/bb/ui/uievent.py