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-1600] Fix exception handling in get_fernet
Date Sat, 16 Sep 2017 15:25:19 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 558198e1b -> 8c8acba9f


[AIRFLOW-1600] Fix exception handling in get_fernet

Also adds LoggingMixin to Connection so it can use
self.logger.

Closes #2600 from GeorgeSirois/fix-fernet-no-
cryptography


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

Branch: refs/heads/master
Commit: 8c8acba9fbb741ac5f1381320660422b40e355a9
Parents: 558198e
Author: George Sirois <gsirois@twitter.com>
Authored: Sat Sep 16 17:25:05 2017 +0200
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Sat Sep 16 17:25:05 2017 +0200

----------------------------------------------------------------------
 airflow/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/8c8acba9/airflow/models.py
----------------------------------------------------------------------
diff --git a/airflow/models.py b/airflow/models.py
index d88c997..be36559 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -96,7 +96,7 @@ def get_fernet():
     """
     try:
         from cryptography.fernet import Fernet
-    except ImportError:
+    except:
         raise AirflowException('Failed to import Fernet, it may not be installed')
     try:
         return Fernet(configuration.get('core', 'FERNET_KEY').encode('utf-8'))
@@ -506,7 +506,7 @@ class User(Base):
         return self.superuser
 
 
-class Connection(Base):
+class Connection(Base, LoggingMixin):
     """
     Placeholder to store information about different database instances
     connection information. The idea here is that scripts use references to


Mime
View raw message