]> git.proxmox.com Git - mirror_ovs.git/commitdiff
checkpatch: Fix handling of line endings.
authorIlya Maximets <i.maximets@samsung.com>
Mon, 15 Apr 2019 13:36:54 +0000 (16:36 +0300)
committerBen Pfaff <blp@ovn.org>
Mon, 15 Apr 2019 19:33:29 +0000 (12:33 -0700)
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 <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/checkpatch.py

index 3699119609c33121379104be9ec709ec240bbb89..441eaa807f36054b5777ad6bfb9e52fc5b5034ad 100755 (executable)
@@ -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