[ovs-dev,06/55] python: Resolve pep8 blank line errors.
diff mbox

Message ID 1450730875-18083-7-git-send-email-russell@ovn.org
State Deferred
Headers show

Commit Message

Russell Bryant Dec. 21, 2015, 8:47 p.m. UTC
Resolve pep8 errors E302 and E303:

  E302 expected 2 blank lines, found 1
  E303 too many blank lines (3)

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 python/ovs/poller.py           | 1 +
 python/ovs/timeval.py          | 3 +++
 python/ovs/unixctl/__init__.py | 1 +
 python/ovs/unixctl/server.py   | 1 +
 python/ovstest/args.py         | 2 ++
 python/ovstest/tests.py        | 1 -
 python/ovstest/vswitch.py      | 1 +
 python/tox.ini                 | 2 +-
 8 files changed, 10 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/python/ovs/poller.py b/python/ovs/poller.py
index d07033b..76234dc 100644
--- a/python/ovs/poller.py
+++ b/python/ovs/poller.py
@@ -35,6 +35,7 @@  POLLERR = 0x008
 POLLHUP = 0x010
 POLLNVAL = 0x020
 
+
 # eventlet/gevent doesn't support select.poll. If select.poll is used,
 # python interpreter is blocked as a whole instead of switching from the
 # current thread that is about to block to other runnable thread.
diff --git a/python/ovs/timeval.py b/python/ovs/timeval.py
index a16bf60..9a0cf67 100644
--- a/python/ovs/timeval.py
+++ b/python/ovs/timeval.py
@@ -52,6 +52,7 @@  except:
     # Librt shared library could not be loaded
     librt = None
 
+
 def monotonic():
     if not librt:
         return time.time()
@@ -62,10 +63,12 @@  def monotonic():
     # Kernel does not support CLOCK_MONOTONIC
     return time.time()
 
+
 # Use time.monotonic() if Python version >= 3.3
 if not hasattr(time, 'monotonic'):
     time.monotonic = monotonic
 
+
 def msec():
     """ Returns the system's monotonic time if possible, otherwise returns the
     current time as the amount of time since the epoch, in milliseconds, as a
diff --git a/python/ovs/unixctl/__init__.py b/python/ovs/unixctl/__init__.py
index 715f2db..c6484c4 100644
--- a/python/ovs/unixctl/__init__.py
+++ b/python/ovs/unixctl/__init__.py
@@ -67,6 +67,7 @@  def command_register(name, usage, min_args, max_args, callback, aux):
         commands[name] = _UnixctlCommand(usage, min_args, max_args, callback,
                                          aux)
 
+
 def socket_name_from_target(target):
     assert isinstance(target, strtypes)
 
diff --git a/python/ovs/unixctl/server.py b/python/ovs/unixctl/server.py
index 18e1cf2..c750fe9 100644
--- a/python/ovs/unixctl/server.py
+++ b/python/ovs/unixctl/server.py
@@ -135,6 +135,7 @@  def _unixctl_version(conn, unused_argv, version):
     version = "%s (Open vSwitch) %s" % (ovs.util.PROGRAM_NAME, version)
     conn.reply(version)
 
+
 class UnixctlServer(object):
     def __init__(self, listener):
         assert isinstance(listener, ovs.stream.PassiveStream)
diff --git a/python/ovstest/args.py b/python/ovstest/args.py
index e90db2a..4344979 100644
--- a/python/ovstest/args.py
+++ b/python/ovstest/args.py
@@ -24,6 +24,7 @@  import sys
 CONTROL_PORT = 15531
 DATA_PORT = 15532
 
+
 def ip_address(string):
     """Verifies if string is a valid IP address"""
     try:
@@ -246,6 +247,7 @@  def ovs_initialize_args():
                 'OuterIP.')
     return parser.parse_args()
 
+
 def l3_initialize_args():
     """
     Initialize argument parsing for ovs-l3ping utility.
diff --git a/python/ovstest/tests.py b/python/ovstest/tests.py
index 5d5a85f..26befef 100644
--- a/python/ovstest/tests.py
+++ b/python/ovstest/tests.py
@@ -139,7 +139,6 @@  def do_l3_tests(node1, node2, bandwidth, duration, ps, type):
             server.del_bridge(DEFAULT_TEST_BRIDGE)
 
 
-
 def do_vlan_tests(node1, node2, bandwidth, duration, ps, tag):
     """
     Do VLAN tests between node1 and node2. Each node is given
diff --git a/python/ovstest/vswitch.py b/python/ovstest/vswitch.py
index be66a2e..1c6726e 100644
--- a/python/ovstest/vswitch.py
+++ b/python/ovstest/vswitch.py
@@ -33,6 +33,7 @@  def ovs_vsctl_del_bridge(bridge):
     ret, _out, _err = util.start_process(["ovs-vsctl", "del-br", bridge])
     return ret
 
+
 def ovs_vsctl_del_pbridge(bridge, iface):
     """
     This function deletes the OVS bridge and assigns the bridge IP address
diff --git a/python/tox.ini b/python/tox.ini
index 9f5947b..44bafd3 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -16,5 +16,5 @@  deps = -r{toxinidir}/requirements.txt
 commands = flake8
 
 [flake8]
-ignore=E111,E113,E126,E127,E128,E129,E131,E201,E203,E226,E231,E241,E251,E261,E262,E265,E271,E302,E303,E501,E711,E721
+ignore=E111,E113,E126,E127,E128,E129,E131,E201,E203,E226,E231,E241,E251,E261,E262,E265,E271,E501,E711,E721
 exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build