mirror of
https://github.com/getredash/redash.git
synced 2025-12-20 01:47:39 -05:00
Merge pull request #1029 from getredash/fixes_160504
Hive: close connection only if it exists
This commit is contained in:
@@ -124,7 +124,8 @@ class Hive(BaseSQLQueryRunner):
|
|||||||
logging.exception(e)
|
logging.exception(e)
|
||||||
raise sys.exc_info()[1], None, sys.exc_info()[2]
|
raise sys.exc_info()[1], None, sys.exc_info()[2]
|
||||||
finally:
|
finally:
|
||||||
connection.close()
|
if connection:
|
||||||
|
connection.close()
|
||||||
|
|
||||||
return json_data, error
|
return json_data, error
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user