summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2016-12-01 12:58:25 -0800
committerDaniele Di Proietto <diproiettod@vmware.com>2016-12-02 11:03:36 -0800
commit884e0dfe8fe85a8d2b21c9c6138cc239648ba312 (patch)
tree48673b1981ead39aaa79828d5bb863e6b49504d5 /python
parent821b86649a904e9668b603db5ea2369c654814e4 (diff)
downloadopenvswitch-884e0dfe8fe85a8d2b21c9c6138cc239648ba312.tar.gz
python: Add double newline after fuction or class (E305).
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>
Diffstat (limited to 'python')
-rw-r--r--python/ovs/db/types.py1
-rw-r--r--python/ovs/fatal_signal.py1
-rw-r--r--python/ovs/stream.py4
-rw-r--r--python/ovs/unixctl/__init__.py1
4 files changed, 7 insertions, 0 deletions
diff --git a/python/ovs/db/types.py b/python/ovs/db/types.py
index 2d2ef8fd3..78d5fcd02 100644
--- a/python/ovs/db/types.py
+++ b/python/ovs/db/types.py
@@ -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)
diff --git a/python/ovs/fatal_signal.py b/python/ovs/fatal_signal.py
index 73e4be6ad..a143e24be 100644
--- a/python/ovs/fatal_signal.py
+++ b/python/ovs/fatal_signal.py
@@ -43,6 +43,7 @@ def fork():
cancel()
_hooks = []
+
_added_hook = False
_files = {}
diff --git a/python/ovs/stream.py b/python/ovs/stream.py
index 59578b131..b43e1050f 100644
--- a/python/ovs/stream.py
+++ b/python/ovs/stream.py
@@ -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)
diff --git a/python/ovs/unixctl/__init__.py b/python/ovs/unixctl/__init__.py
index 48b56d45d..a2b13f9b3 100644
--- a/python/ovs/unixctl/__init__.py
+++ b/python/ovs/unixctl/__init__.py
@@ -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)