Browse Source

Do not automatically import zmq

pull/1108/head
Miguel Grinberg 2 years ago
parent
commit
de4d5b51e5
  1. 9
      src/socketio/zmq_manager.py

9
src/socketio/zmq_manager.py

@ -1,11 +1,6 @@
import pickle
import re
try:
import eventlet.green.zmq as zmq
except ImportError:
zmq = None
from .pubsub_manager import PubSubManager
@ -51,7 +46,9 @@ class ZmqManager(PubSubManager): # pragma: no cover
channel='socketio',
write_only=False,
logger=None):
if zmq is None:
try:
from eventlet.green import zmq
except ImportError:
raise RuntimeError('zmq package is not installed '
'(Run "pip install pyzmq" in your '
'virtualenv).')

Loading…
Cancel
Save