Remove deprecated PyZMQ call from Python ZMQ example

PyZMQ 17.0.0 has deprecated and removed zmq.asyncio.install() call
with advice to use asyncio native run-loop instead of zmq specific.

This caused exception when running the contrib/zmq/zmq_sub*.py examples.

This commit simply follows the advice.
pull/12588/head
Michał Zabielski 7 years ago
parent 90a0aed511
commit 6058766de4

@ -38,7 +38,7 @@ port = 28332
class ZMQHandler():
def __init__(self):
self.loop = zmq.asyncio.install()
self.loop = asyncio.get_event_loop()
self.zmqContext = zmq.asyncio.Context()
self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)

@ -42,7 +42,7 @@ port = 28332
class ZMQHandler():
def __init__(self):
self.loop = zmq.asyncio.install()
self.loop = asyncio.get_event_loop()
self.zmqContext = zmq.asyncio.Context()
self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)

Loading…
Cancel
Save