Unlike manual splitting, 'splitlines' correctly handles different line endings. Without this change script fails to check files with '\r\n' endings treating the whole patch as a header.
Signed-off-by: Ilya Maximets <[email protected]> --- utilities/checkpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 369911960..441eaa807 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -725,7 +725,7 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None): reset_counters() - for line in text.split('\n'): + for line in text.splitlines(): if current_file != previous_file: previous_file = current_file -- 2.17.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
