diff --git a/socketIO_client/transports.py b/socketIO_client/transports.py index 0cfe6c6..3b77485 100644 --- a/socketIO_client/transports.py +++ b/socketIO_client/transports.py @@ -4,12 +4,19 @@ import re import requests import six import socket +import sys import time import websocket from .exceptions import SocketIOError, ConnectionError, TimeoutError +if not hasattr(websocket, 'create_connection'): + sys.exit("""Incompatible websocket implementation +- Please make sure that you have websocket-client installed +- Please remove other websocket implementations""") + + TRANSPORTS = 'websocket', 'xhr-polling', 'jsonp-polling' BOUNDARY = six.u('\ufffd') TIMEOUT_IN_SECONDS = 3