From: Chris Larson Date: Fri, 3 Jun 2011 18:29:44 +0000 (-0400) Subject: bb.exceptions: don't choke on frames without arguments X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f74a38ffdaa409fa1dfbfa2a54dbac9df9aba31;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bb.exceptions: don't choke on frames without arguments (Bitbake rev: c9bb37e588ee7ee95eca798b0eae57bad68e8caf) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/exceptions.py b/bitbake/lib/bb/exceptions.py index 62d62cd4d8c..4dd3e2cc314 100644 --- a/bitbake/lib/bb/exceptions.py +++ b/bitbake/lib/bb/exceptions.py @@ -32,6 +32,9 @@ class TracebackEntry(namedtuple.abc): def _get_frame_args(frame): """Get the formatted arguments and class (if available) for a frame""" arginfo = inspect.getargvalues(frame) + if not arginfo.args: + return '', None + firstarg = arginfo.args[0] if firstarg == 'self': self = arginfo.locals['self']