From: Ilya Maximets Date: Mon, 15 Apr 2019 13:36:54 +0000 (+0300) Subject: checkpatch: Fix handling of line endings. X-Git-Tag: v2.12.3~537 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4bee6d8b03e69ac04f1c66d7cb43085114db4f13;p=mirror_ovs.git checkpatch: Fix handling of line endings. 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 Signed-off-by: Ben Pfaff --- 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