[ovs-dev] [PATCH] treewide: Fix recent flake8-check.
Joe Stringer
joe at ovn.org
Thu Dec 8 18:22:16 UTC 2016
Without this patch, I see errors like this on master:
../ofproto/ipfix-gen-entities:115:1: E305 expected 2 blank lines after
class or function definition, found 1
Signed-off-by: Joe Stringer <joe at ovn.org>
---
ofproto/ipfix-gen-entities | 1 +
utilities/ovs-pcap.in | 3 +++
utilities/ovs-tcpdump.in | 1 +
vtep/ovs-vtep | 1 +
4 files changed, 6 insertions(+)
diff --git a/ofproto/ipfix-gen-entities b/ofproto/ipfix-gen-entities
index a603cd1d1f2e..0be719967d17 100755
--- a/ofproto/ipfix-gen-entities
+++ b/ofproto/ipfix-gen-entities
@@ -112,6 +112,7 @@ The following options are also available:
""" % {'name': name})
sys.exit(0)
+
if __name__ == '__main__':
try:
options, args = getopt.gnu_getopt(sys.argv[1:], 'hV',
diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in
index 2e9197d15ffa..c43acb52eae0 100755
--- a/utilities/ovs-pcap.in
+++ b/utilities/ovs-pcap.in
@@ -55,6 +55,8 @@ class PcapReader(object):
if len(packet) != incl_len:
raise PcapException("end of file reading pcap packet data")
return packet
+
+
argv0 = sys.argv[0]
@@ -70,6 +72,7 @@ The following options are also available:
""" % {'argv0': argv0})
sys.exit(0)
+
if __name__ == "__main__":
try:
try:
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index 538b3b405c8e..a6e4adadb428 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -67,6 +67,7 @@ def _install_tap_linux(tap_name):
*(['ip', 'link', 'set', 'dev', str(tap_name), 'up']))
pipe.wait()
+
_make_taps['linux'] = _install_tap_linux
_make_taps['linux2'] = _install_tap_linux
diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
index b32a82a907ea..9a5aa3d680bb 100755
--- a/vtep/ovs-vtep
+++ b/vtep/ovs-vtep
@@ -752,6 +752,7 @@ def main():
unixctl.close()
+
if __name__ == '__main__':
try:
main()
--
2.10.2
More information about the dev
mailing list