]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
authorRichard Purdie <rpurdie@linux.intel.com>
Sun, 5 Dec 2010 22:51:38 +0000 (22:51 +0000)
committerChris Larson <chris_larson@mentor.com>
Fri, 17 Dec 2010 20:20:13 +0000 (13:20 -0700)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
lib/bb/utils.py

index d5028e19c63ea2c7120546c8a9a2baf1ae5d9169..986f94f3f3bc00bcaef9f53765e41d5ea95545e4 100644 (file)
@@ -297,10 +297,12 @@ def _print_trace(body, line):
     """
     # print the environment of the method
     min_line = max(1, line-4)
-    max_line = min(line + 4, len(body)-1)
+    max_line = min(line + 4, len(body))
     for i in xrange(min_line, max_line + 1):
-        logger.error("\t%.4d:%s", i, body[i-1])
-
+        if line == i:
+            logger.error(' *** %.4d:%s', i, body[i-1])
+        else:
+            logger.error('     %.4d:%s', i, body[i-1])
 
 def better_compile(text, file, realfile, mode = "exec"):
     """