Skip to content

Commit

Permalink
checkpatch: correct a parsing issue
Browse files Browse the repository at this point in the history
Occasionally, characters will be sent which violate the
ascii decoder's sense of propriety.  In fact, in-tree there are
a few such files (ex: tests/atlocal.in), and they cause an
exception to be raised when they are encountered.

Set the policy to ignore these cases.  This means these bytes are
omitted from the text stream during processing.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
apconole authored and blp committed May 1, 2017
1 parent 907848b commit 0b93d97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/checkpatch.py
Expand Up @@ -252,7 +252,7 @@ def ovs_checkpatch_parse(text):
is_co_author = re.compile(r'(\s*(Co-authored-by: )(.*))$',
re.I | re.M | re.S)

for line in text.decode().split('\n'):
for line in text.decode(errors='ignore').split('\n'):
if current_file != previous_file:
previous_file = current_file

Expand Down

0 comments on commit 0b93d97

Please sign in to comment.