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