Message ID | 20170501201409.12116-5-aconole@redhat.com |
---|---|
State | Accepted |
Headers | show |
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 9d4e469..9f8f30f 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -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
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> --- utilities/checkpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)