projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef0e9de
)
patman: Handle checkpatch.pl not providing file/line info
author
Simon Glass
<sjg@chromium.org>
Thu, 27 Sep 2012 15:33:46 +0000
(15:33 +0000)
committer
Tom Rini
<trini@ti.com>
Mon, 15 Oct 2012 18:54:04 +0000
(11:54 -0700)
Sometimes we don't get a valid filename or line number from checkpatch.pl,
for example if the patch is in a bad format. Deal with this by using a
default value, rather than a stack trace.
Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/checkpatch.py
patch
|
blob
|
history
diff --git
a/tools/patman/checkpatch.py
b/tools/patman/checkpatch.py
index a234277177866f58d75df0d0048f691beeba8c00..d831087d88b39706b6afee2e70d79ecc8fe434ca 100644
(file)
--- a/
tools/patman/checkpatch.py
+++ b/
tools/patman/checkpatch.py
@@
-145,8
+145,9
@@
def CheckPatches(verbose, args):
if len(problems) != error_count + warning_count:
print "Internal error: some problems lost"
for item in problems:
- print GetWarningMsg(col, item['type'], item['file'],
- item['line'], item['msg'])
+ print GetWarningMsg(col, item['type'],
+ item.get('file', '<unknown>'),
+ item.get('line', 0), item['msg'])
#print stdout
if error_count != 0 or warning_count != 0:
str = 'checkpatch.pl found %d error(s), %d warning(s)' % (