dabla commented on code in PR #38707:
URL: https://github.com/apache/airflow/pull/38707#discussion_r1557020070
##########
airflow/providers/jdbc/hooks/jdbc.py:
##########
@@ -152,7 +153,8 @@ def set_autocommit(self, conn: jaydebeapi.Connection,
autocommit: bool) -> None:
:param conn: The connection.
:param autocommit: The connection's autocommit setting.
"""
- conn.jconn.setAutoCommit(autocommit)
+ with suppress(jaydebeapi.Error):
+ conn.jconn.setAutoCommit(autocommit)
Review Comment:
Yes indeed that would be better will do that, I assumed the suppress would
already do that but that's not the case indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]