diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-08 13:05:44 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-08 13:05:44 +0000 |
commit | f48a54fc1eaddd135dcc235c241476493e34c516 (patch) | |
tree | b377cb12f140c5674beb021926a4248fa9ac63d4 /lib | |
parent | cffd991f8c01ac3840a0f7cd0653182ef55075de (diff) | |
download | bitbake-f48a54fc1eaddd135dcc235c241476493e34c516.tar.gz |
lib/bb/utils.py:
Do not go past the buffer
(this looks like copy and paste)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 9cbef2313..978bde270 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -113,7 +113,7 @@ def better_compile(text, file, realfile): # print the environment of the method bb.error("Printing the environment of the function") min_line = max(1,e.lineno-4) - max_line = min(e.lineno+4,len(body)) + max_line = min(e.lineno+4,len(body)-1) for i in range(min_line,max_line+1): bb.error("\t%.4d:%s" % (i, body[i-1]) ) @@ -154,7 +154,7 @@ def better_exec(code, context, text, realfile): # print the environment of the method bb.error("Printing the environment of the function") min_line = max(1,line-4) - max_line = min(line+4,len(body)) + max_line = min(line+4,len(body)-1) for i in range(min_line,max_line+1): bb.error("\t%.4d:%s" % (i, body[i-1]) ) |