Skip to content

Commit

Permalink
checkpatch: Print the line in question distinctly
Browse files Browse the repository at this point in the history
This makes it easier to distinguish between the line, and
the warning/error message.

Signed-off-by: Aaron Conole <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
apconole authored and blp committed Nov 29, 2016
1 parent 3239c79 commit 7d6b834
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def usage():


def ovs_checkpatch_file(filename):
global __warnings, __errors
try:
mail = email.message_from_file(open(filename, 'r'))
except:
Expand All @@ -259,7 +260,10 @@ def ovs_checkpatch_file(filename):
for part in mail.walk():
if part.get_content_maintype() == 'multipart':
continue
return ovs_checkpatch_parse(part.get_payload(decode=True))
result = ovs_checkpatch_parse(part.get_payload(decode=True))
if result < 0:
print("Warnings: %d, Errors: %d" % (__warnings, __errors))
return result

if __name__ == '__main__':
try:
Expand Down

0 comments on commit 7d6b834

Please sign in to comment.