aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-12-05 22:51:38 +0000
committerChris Larson <chris_larson@mentor.com>2010-12-17 13:20:13 -0700
commitb23356a96c3df98af2ac5168ed1d350efc1a3dcd (patch)
tree02c11b46eec64d28ad35e308334ed4567cefc664
parent70cba0e84da29fa49bc232a8a6185a75a300bce8 (diff)
downloadbitbake-b23356a96c3df98af2ac5168ed1d350efc1a3dcd.tar.gz
bitbake-b23356a96c3df98af2ac5168ed1d350efc1a3dcd.tar.bz2
bitbake-b23356a96c3df98af2ac5168ed1d350efc1a3dcd.zip
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--lib/bb/utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index d5028e19..986f94f3 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -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"):
"""