mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
bb.exceptions: don't choke on frames without arguments
(Bitbake rev: c9bb37e588ee7ee95eca798b0eae57bad68e8caf) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3fd34462ed
commit
0f74a38ffd
@@ -32,6 +32,9 @@ class TracebackEntry(namedtuple.abc):
|
|||||||
def _get_frame_args(frame):
|
def _get_frame_args(frame):
|
||||||
"""Get the formatted arguments and class (if available) for a frame"""
|
"""Get the formatted arguments and class (if available) for a frame"""
|
||||||
arginfo = inspect.getargvalues(frame)
|
arginfo = inspect.getargvalues(frame)
|
||||||
|
if not arginfo.args:
|
||||||
|
return '', None
|
||||||
|
|
||||||
firstarg = arginfo.args[0]
|
firstarg = arginfo.args[0]
|
||||||
if firstarg == 'self':
|
if firstarg == 'self':
|
||||||
self = arginfo.locals['self']
|
self = arginfo.locals['self']
|
||||||
|
|||||||
Reference in New Issue
Block a user