]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.exceptions: don't choke on frames without arguments
authorChris Larson <chris_larson@mentor.com>
Fri, 3 Jun 2011 18:29:44 +0000 (14:29 -0400)
committerChris Larson <chris_larson@mentor.com>
Fri, 3 Jun 2011 18:29:44 +0000 (14:29 -0400)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/exceptions.py

index 62d62cd4d8c7ccbbb97a2fc4dba8dfcdb320e2ff..4dd3e2cc314d7fe32928c94f7c64dd8dcfbca871 100644 (file)
@@ -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']