mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 12:32:12 +02:00
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -304,9 +304,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 range(min_line, max_line + 1):
|
||||
bb.msg.error(bb.msg.domain.Util, "\t%.4d:%s" % (i, body[i-1]) )
|
||||
if line == i:
|
||||
bb.msg.error(bb.msg.domain.Util, " *** %.4d:%s" % (i, body[i-1]) )
|
||||
else:
|
||||
bb.msg.error(bb.msg.domain.Util, " %.4d:%s" % (i, body[i-1]) )
|
||||
|
||||
|
||||
def better_compile(text, file, realfile, mode = "exec"):
|
||||
|
||||
Reference in New Issue
Block a user