diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-05 22:51:38 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-05 22:51:38 +0000 |
commit | 1a0c39e05067aa1b3c70de08380b8032227bf690 (patch) | |
tree | 62ee13abafdab1fd5d51e0dc41b9638e1c675070 /bitbake/lib/bb/utils.py | |
parent | a80a839dc9a2f21e2295cef46c6f7fc04a52d671 (diff) | |
download | poky-1a0c39e05067aa1b3c70de08380b8032227bf690.tar.gz |
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index c2e6ff08ed..ed28f86c4b 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -304,9 +304,12 @@ def _print_trace(body, line): | |||
304 | """ | 304 | """ |
305 | # print the environment of the method | 305 | # print the environment of the method |
306 | min_line = max(1, line-4) | 306 | min_line = max(1, line-4) |
307 | max_line = min(line + 4, len(body)-1) | 307 | max_line = min(line + 4, len(body)) |
308 | for i in range(min_line, max_line + 1): | 308 | for i in range(min_line, max_line + 1): |
309 | bb.msg.error(bb.msg.domain.Util, "\t%.4d:%s" % (i, body[i-1]) ) | 309 | if line == i: |
310 | bb.msg.error(bb.msg.domain.Util, " *** %.4d:%s" % (i, body[i-1]) ) | ||
311 | else: | ||
312 | bb.msg.error(bb.msg.domain.Util, " %.4d:%s" % (i, body[i-1]) ) | ||
310 | 313 | ||
311 | 314 | ||
312 | def better_compile(text, file, realfile, mode = "exec"): | 315 | def better_compile(text, file, realfile, mode = "exec"): |