airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-2365] Fix autocommit attribute check
Date Tue, 24 Apr 2018 06:21:04 GMT
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 <arthur@apache.org>
Authored: Tue Apr 24 08:20:57 2018 +0200
Committer: Bolke de Bruin <bolke@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):


Mime
View raw message