diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3797fccf..49935615 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,7 @@ Other ----- * Don't ignore column names when parsing typestrings. This is needed for user-defined type support. (github issue #90) +* Better error message when libevwrapper is not found 1.0.2 ===== diff --git a/cassandra/io/libevreactor.py b/cassandra/io/libevreactor.py index 0fbf21fc..a5d83d4e 100644 --- a/cassandra/io/libevreactor.py +++ b/cassandra/io/libevreactor.py @@ -14,7 +14,16 @@ from cassandra.connection import (Connection, ResponseWaiter, ConnectionShutdown MAX_STREAM_PER_CONNECTION) from cassandra.decoder import RegisterMessage from cassandra.marshal import int32_unpack -import cassandra.io.libevwrapper as libev +try: + import cassandra.io.libevwrapper as libev +except ImportError: + raise ImportError( + "The C extension needed to use libev was not found. This " + "probably means that you didn't have the required build dependencies " + "when installing the driver. See " + "http://datastax.github.io/python-driver/installation.html#c-extensions " + "for instructions on installing build dependencies and building " + "the C extension.") try: from cStringIO import StringIO