Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc0fc0a

Browse files
author
Louis Opter
committed
Subscriber/Puller constructors take a methods argument
The Subscriber and Puller constructors were missing the `methods' arguments making them unusable with an already instantied object. Likewise, the unused name argument has been removed from the Puller class.
1 parent 1aa17bc commit bc0fc0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zerorpc/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,7 @@ def __getattr__(self, method):
336336

337337
class Puller(SocketBase):
338338

339-
def __init__(self, methods=None, name=None, context=None,
340-
zmq_socket=zmq.PULL):
339+
def __init__(self, methods=None, context=None, zmq_socket=zmq.PULL):
341340
super(Puller, self).__init__(zmq_socket, context=context)
342341

343342
if methods is None:
@@ -398,6 +397,7 @@ def __init__(self, context=None):
398397

399398
class Subscriber(Puller):
400399

401-
def __init__(self, context=None):
402-
super(Subscriber, self).__init__(context=context, zmq_socket=zmq.SUB)
400+
def __init__(self, methods=None, context=None):
401+
super(Subscriber, self).__init__(methods=methods, context=context,
402+
zmq_socket=zmq.SUB)
403403
self._events.setsockopt(zmq.SUBSCRIBE, '')

0 commit comments

Comments
 (0)