summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib/rpc.py
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-12-15 10:50:17 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-12-17 19:27:47 +0900
commit6e3eccb4536c9024db0e5c4be68566e09869761c (patch)
treea551ff0071a6572e6e85b4cf2e60ce03054ca3c2 /ryu/lib/rpc.py
parent83650576e4280bff7dac7083b7e842704852093b (diff)
*: Apply autopep8
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'ryu/lib/rpc.py')
-rw-r--r--ryu/lib/rpc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ryu/lib/rpc.py b/ryu/lib/rpc.py
index bb4742a0..7db0ebeb 100644
--- a/ryu/lib/rpc.py
+++ b/ryu/lib/rpc.py
@@ -37,6 +37,7 @@ class MessageEncoder(object):
"""msgpack-rpc encoder/decoder.
intended to be transport-agnostic.
"""
+
def __init__(self):
super(MessageEncoder, self).__init__()
self._packer = msgpack.Packer(encoding='utf-8', use_bin_type=True)
@@ -91,6 +92,7 @@ class EndPoint(object):
"""An endpoint
*sock* is a socket-like. it can be either blocking or non-blocking.
"""
+
def __init__(self, sock, encoder=None, disp_table=None):
if encoder is None:
encoder = MessageEncoder()
@@ -236,6 +238,7 @@ class EndPoint(object):
class RPCError(Exception):
"""an error from server
"""
+
def __init__(self, error):
super(RPCError, self).__init__()
self._error = error
@@ -251,6 +254,7 @@ class Client(object):
"""a convenient class for a pure rpc client
*sock* is a socket-like. it should be blocking.
"""
+
def __init__(self, sock, encoder=None, notification_callback=None):
self._endpoint = EndPoint(sock, encoder)
if notification_callback is None: