Skip to content

Commit

Permalink
[Cassandra] Fix: remove reference to non existing Error class
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr authored Nov 23, 2016
1 parent 9f68dee commit f3db250
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions redash/query_runner/cass.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
logger = logging.getLogger(__name__)

try:
from cassandra.cluster import Cluster, Error
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
enabled = True
except ImportError:
Expand Down Expand Up @@ -85,10 +85,9 @@ def run_query(self, query, user):
json_data = json.dumps(data, cls=JSONEncoder)

error = None
except Error as e:
error = e.args[1]
except KeyboardInterrupt:
error = "Query cancelled by user."
json_data = None

return json_data, error

Expand Down

0 comments on commit f3db250

Please sign in to comment.