Skip to content

Commit

Permalink
exit with error if gevent-socketio is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Nov 10, 2015
1 parent 09d5f76 commit f6610d3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import sys

# make sure gevent-socketio is not installed, as it conflicts with
# python-socketio
gevent_socketio_found = True
try:
from socketio import socketio_manage
except ImportError:
gevent_socketio_found = False
if gevent_socketio_found:
print('The gevent-socketio package is incompatible with this version of '
'the Flask-SocketIO extension. Please uinistall it, and then '
'install the latest version of python-socketio in its place.')
sys.exit(1)

import socketio
import flask
from werkzeug.debug import DebuggedApplication
Expand Down

0 comments on commit f6610d3

Please sign in to comment.