Skip to content

Commit

Permalink
Merge pull request #1029 from getredash/fixes_160504
Browse files Browse the repository at this point in the history
Hive: close connection only if it exists
  • Loading branch information
arikfr committed May 4, 2016
2 parents 7062873 + e32bfe3 commit b3844d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redash/query_runner/hive_ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def run_query(self, query):
logging.exception(e)
raise sys.exc_info()[1], None, sys.exc_info()[2]
finally:
connection.close()
if connection:
connection.close()

return json_data, error

Expand Down

0 comments on commit b3844d3

Please sign in to comment.