Skip to content

Commit

Permalink
Merge pull request #1427 from getredash/cass
Browse files Browse the repository at this point in the history
[Cassandra] Fix: remove reference to non existing Error class
  • Loading branch information
arikfr authored Nov 24, 2016
2 parents 9f68dee + f3db250 commit b9aeb2f
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 b9aeb2f

Please sign in to comment.