]> git.proxmox.com Git - mirror_ovs.git/commitdiff
python: Add double newline after fuction or class (E305).
authorDaniele Di Proietto <diproiettod@vmware.com>
Thu, 1 Dec 2016 20:58:25 +0000 (12:58 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Fri, 2 Dec 2016 19:03:36 +0000 (11:03 -0800)
pycodestyle >= 2.1.0 reports E305 otherwise, and the flake8-check step
fails.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
python/ovs/db/types.py
python/ovs/fatal_signal.py
python/ovs/stream.py
python/ovs/unixctl/__init__.py
utilities/checkpatch.py
utilities/ovs-dev.py

index 2d2ef8fd3d0eeb990cb58034a76bc472bd0946ad..78d5fcd02c8bc4bf30e4d1d4bfc1974bbffdb77c 100644 (file)
@@ -56,6 +56,7 @@ class AtomicType(object):
     def default_atom(self):
         return ovs.db.data.Atom(self, self.default)
 
+
 REAL_PYTHON_TYPES = list(six.integer_types)
 REAL_PYTHON_TYPES.extend([float])
 REAL_PYTHON_TYPES = tuple(REAL_PYTHON_TYPES)
index 73e4be6ad8f2f8e317393e437e22f6701b1badad..a143e24be049deaea205e54f675b7bb00362b4cc 100644 (file)
@@ -43,6 +43,7 @@ def fork():
             cancel()
 
     _hooks = []
+
 \f
 _added_hook = False
 _files = {}
index 59578b1319d53c1bc7f615ff620e81d0f90357c7..b43e1050fbca5967dd46a438a1cb673b8329d64e 100644 (file)
@@ -395,6 +395,8 @@ class UnixStream(Stream):
         connect_path = suffix
         return ovs.socket_util.make_unix_socket(socket.SOCK_STREAM,
                                                 True, None, connect_path)
+
+
 Stream.register_method("unix", UnixStream)
 
 
@@ -406,6 +408,8 @@ class TCPStream(Stream):
         if not error:
             sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
         return error, sock
+
+
 Stream.register_method("tcp", TCPStream)
 
 
index 48b56d45d010edddc2618d5103bd750336e8e747..a2b13f9b3d8337cfe4edd19a5e0b22ec509d8e19 100644 (file)
@@ -86,4 +86,5 @@ def socket_name_from_target(target):
     else:
         return 0, "%s/%s.%d.ctl" % (ovs.dirs.RUNDIR, target, pid)
 
+
 command_register("help", "", 0, 0, _unixctl_help, None)
index 5e6e83d5a4ffa9e39bce304491140e2f94a7ddef..26eb5c32b9bc0997e780e9b0aebbc92dcd8706c7 100755 (executable)
@@ -298,6 +298,7 @@ def ovs_checkpatch_file(filename):
         print("Warnings: %d, Errors: %d" % (__warnings, __errors))
     return result
 
+
 if __name__ == '__main__':
     try:
         optlist, args = getopt.getopt(sys.argv[1:], 'bhlstf',
index 9188d732b272a9e76f5201c921d5c5aebd7f2136..6a626a1199464775acb9aecd574ca355da05427b 100755 (executable)
@@ -149,12 +149,16 @@ def conf():
     mf.write("\ncheck:\n")
     mf.write(make_str % BUILD_GCC)
     mf.close()
+
+
 commands.append(conf)
 
 
 def make(args=""):
     make = "make -s -j 8 " + args
     _sh(make)
+
+
 commands.append(make)
 
 
@@ -172,6 +176,8 @@ def check():
                 flags += "-k %s " % arg
     ENV["TESTSUITEFLAGS"] = flags
     make("check")
+
+
 commands.append(check)
 
 
@@ -190,6 +196,8 @@ def tag():
         _sh('cscope', '-R', '-b')
     except:
         pass
+
+
 commands.append(tag)
 
 
@@ -200,6 +208,8 @@ def kill():
             _sh("ovs-appctl", "-t", proc, "exit", check=False)
             time.sleep(.1)
         _sh("killall", "-q", "-2", proc, check=False)
+
+
 commands.append(kill)
 
 
@@ -210,6 +220,8 @@ def reset():
         shutil.rmtree(RUNDIR)
     for dp in _sh("ovs-dpctl dump-dps", capture=True):
         _sh("ovs-dpctl", "del-dp", dp.decode().strip())
+
+
 commands.append(reset)
 
 
@@ -285,6 +297,8 @@ def run():
     else:
         opts = opts + ["-vconsole:off", "--detach", "--enable-dummy"]
     _sh(*(cmd + opts))
+
+
 commands.append(run)
 
 
@@ -313,11 +327,15 @@ def modinst():
     _sh("dmesg | grep openvswitch | tail -1")
     _sh("find /lib/modules/%s/ -iname vport-*.ko -exec insmod '{}' \;"
         % uname())
+
+
 commands.append(modinst)
 
 
 def env():
     print("export PATH=" + ENV["PATH"])
+
+
 commands.append(env)
 
 
@@ -373,6 +391,8 @@ Note:
     will always run as the root user, by rerun the commands with "sudo".
 """ % {"ovs": OVS_SRC, "v": sys.argv[0], "run": RUNDIR})
     sys.exit(0)
+
+
 commands.append(doc)