[ovs-dev] [PATCH v2 09/12] python: Remove unnecessary semicolons and slashes.

Russell Bryant russell at ovn.org
Tue Jan 5 19:59:02 UTC 2016


Resolve the following flake8 errors:

  E703 statement ends with a semicolon
  E502 the backslash is redundant between brackets

Also document the reamining flake8 errors that are still ignored.

Signed-off-by: Russell Bryant <russell at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>
---
 Makefile.am                                           | 11 ++++++++++-
 vtep/ovs-vtep                                         |  8 ++++----
 xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync |  2 +-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ab6087b..376212c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -342,8 +342,17 @@ endif
 
 if HAVE_FLAKE8
 ALL_LOCAL += flake8-check
+# E111 indentation is not a multiple of four
+# E112 expected an indented block
+# E113 unexpected indentation
+# E123 closing bracket does not match indentation of opening bracket's line
+# E126 continuation line over-indented for hanging indent
+# E127 continuation line over-indented for visual indent
+# E128 continuation line under-indented for visual indent
+# E129 visually indented line with same indent as next logical line
+# E131 continuation line unaligned for hanging indent
 flake8-check: $(FLAKE8_PYFILES)
-	$(AM_V_GEN) if flake8 $^ --ignore=E111,E112,E113,E123,E126,E127,E128,E129,E131,E502,E703 ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
+	$(AM_V_GEN) if flake8 $^ --ignore=E111,E112,E113,E123,E126,E127,E128,E129,E131 ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
 endif
 
 include $(srcdir)/manpages.mk
diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
index 07856c4..dd5b1a7 100755
--- a/vtep/ovs-vtep
+++ b/vtep/ovs-vtep
@@ -165,7 +165,7 @@ class Logical_Switch(object):
     def del_lbinding(self, lbinding):
         vlog.info("removing %s binding from %s" % (lbinding, self.name))
         port_no = self.ports[lbinding]
-        ovs_ofctl("del-flows %s in_port=%s" % (self.short_name, port_no));
+        ovs_ofctl("del-flows %s in_port=%s" % (self.short_name, port_no))
         del self.ports[lbinding]
         self.update_flood()
 
@@ -520,9 +520,9 @@ def add_binding(binding, ls):
     # Create a logical_bindings_stats record.
     if not vlan_:
         vlan_ = "0"
-    vtep_ctl("set physical_port %s vlan_stats:%s=@stats --\
-            --id=@stats create logical_binding_stats packets_from_local=0"\
-            % (pp_name, vlan_))
+    vtep_ctl("set physical_port %s vlan_stats:%s=@stats -- "
+             "--id=@stats create logical_binding_stats packets_from_local=0"
+             % (pp_name, vlan_))
 
     ls.add_lbinding(lbinding)
     Bindings[binding] = ls.name
diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
index 498857a..f6fbe85 100755
--- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
+++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
@@ -268,7 +268,7 @@ def main():
     while True:
         unixctl_server.run()
         if exiting:
-            break;
+            break
 
         idl.run()
         if not xapi_down and not flush_cache and seqno == idl.change_seqno:
-- 
2.5.0




More information about the dev mailing list