You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2018/04/24 06:21:04 UTC

incubator-airflow git commit: [AIRFLOW-2365] Fix autocommit attribute check

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 1f86299cf -> 813136f45


[AIRFLOW-2365] Fix autocommit attribute check

Closes #3258 from artwr/awiedmer-fix-dbapi-test-
issue


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/813136f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/813136f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/813136f4

Branch: refs/heads/master
Commit: 813136f457b554561402b4a2510a2a4234f76b6a
Parents: 1f86299
Author: Arthur Wiedmer <ar...@apache.org>
Authored: Tue Apr 24 08:20:57 2018 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Tue Apr 24 08:20:57 2018 +0200

----------------------------------------------------------------------
 airflow/hooks/dbapi_hook.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/813136f4/airflow/hooks/dbapi_hook.py
----------------------------------------------------------------------
diff --git a/airflow/hooks/dbapi_hook.py b/airflow/hooks/dbapi_hook.py
index 304fbf9..70439e8 100644
--- a/airflow/hooks/dbapi_hook.py
+++ b/airflow/hooks/dbapi_hook.py
@@ -169,7 +169,7 @@ class DbApiHook(BaseHook):
                     else:
                         cur.execute(s)
 
-            if not conn.autocommit:
+            if not getattr(conn, 'autocommit', False):
                 conn.commit()
 
     def set_autocommit(self, conn, autocommit):