This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new de99005  Remove duplicate get_connection in SnowflakeHook (#19543)
de99005 is described below

commit de9900539c9731325e29fd1bbac37c4bc1363bc4
Author: harryplumer <[email protected]>
AuthorDate: Thu Nov 11 16:50:36 2021 -0700

    Remove duplicate get_connection in SnowflakeHook (#19543)
---
 airflow/providers/snowflake/hooks/snowflake.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/airflow/providers/snowflake/hooks/snowflake.py 
b/airflow/providers/snowflake/hooks/snowflake.py
index 34596e1..8b026b5 100644
--- a/airflow/providers/snowflake/hooks/snowflake.py
+++ b/airflow/providers/snowflake/hooks/snowflake.py
@@ -268,8 +268,7 @@ class SnowflakeHook(DbApiHook):
         """
         self.query_ids = []
 
-        with self.get_conn() as conn:
-            conn = self.get_conn()
+        with closing(self.get_conn()) as conn:
             self.set_autocommit(conn, autocommit)
 
             if isinstance(sql, str):

Reply via email to