summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-01-26 11:45:52 -0800
committerBen Pfaff <blp@ovn.org>2018-01-26 12:51:18 -0800
commit8df9a0c4108be3b1729fd72707d062008d74ef2e (patch)
tree6d9240056bc558b45c30607ce62b74591bde967a /utilities
parent6399df6a88264a61811d377553dcac56736c6bed (diff)
downloadopenvswitch-8df9a0c4108be3b1729fd72707d062008d74ef2e.tar.gz
checkpatch.py: Fix Python style.
Fixes the following warnings: ../utilities/checkpatch.py:219:1: E302 expected 2 blank lines, found 1 ../utilities/checkpatch.py:224:1: E302 expected 2 blank lines, found 1 ../utilities/checkpatch.py:228:1: E302 expected 2 blank lines, found 1 CC: Justin Pettit <jpettit@ovn.org> Fixes: 4e99b70dfae0 ("checkpatch.py: Add check for "xxx" in comments.") Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/checkpatch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 42777e6fc..8a3895240 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -216,15 +216,18 @@ def is_comment_line(line):
"""Returns TRUE if the current line is part of a block comment."""
return __regex_is_comment_line.match(line) is not None
+
def has_comment(line):
"""Returns TRUE if the current line contains a comment or is part of
a block comment."""
return __regex_has_comment.match(line) is not None
+
def trailing_operator(line):
"""Returns TRUE if the current line ends with an operatorsuch as ? or :"""
return __regex_trailing_operator.match(line) is not None
+
def has_xxx_mark(line):
"""Returns TRUE if the current line contains 'xxx'."""
return __regex_has_xxx_mark.match(line) is not None