Skip to content

Commit

Permalink
Prevent alarming users with stacktrace when using sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 20, 2017
1 parent e71596d commit e2b572d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def upgrade():
op.create_unique_constraint(None, 'dbs', ['verbose_name'])
op.create_unique_constraint(None, 'clusters', ['verbose_name'])
except Exception as e:
logging.exception(e)
logging.info('Constraint not created, expected when using sqlite')


def downgrade():
Expand Down
2 changes: 2 additions & 0 deletions superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def handle_error(msg):
conn = engine.raw_connection()
cursor = conn.cursor()
try:
print(query.executed_sql)
logging.info(query.executed_sql)
cursor.execute(
query.executed_sql, **db_engine_spec.cursor_execute_kwargs)
except Exception as e:
Expand Down

0 comments on commit e2b572d

Please sign in to comment.