Commit afb9bf55 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

patman: Handle checkpatch.pl not providing file/line info



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: default avatarSimon Glass <sjg@chromium.org>
parent ef0e9de8
......@@ -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)' % (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment