You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jl...@apache.org on 2016/06/17 11:57:16 UTC

[3/4] incubator-airflow git commit: Add Python 3 compatibility fix

Add Python 3 compatibility fix

In Python 3, errors don\u2019t have a `message` attribute


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

Branch: refs/heads/master
Commit: f26b7a25d9c4632af68d9d64ac5f4a929a44f426
Parents: 851adc5
Author: jlowin <jl...@users.noreply.github.com>
Authored: Thu Jun 16 16:53:27 2016 -0400
Committer: jlowin <jl...@users.noreply.github.com>
Committed: Thu Jun 16 16:53:27 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/f26b7a25/airflow/operators/sensors.py
----------------------------------------------------------------------
diff --git a/airflow/operators/sensors.py b/airflow/operators/sensors.py
index 6d87b44..5276f6e 100644
--- a/airflow/operators/sensors.py
+++ b/airflow/operators/sensors.py
@@ -532,7 +532,7 @@ class HttpSensor(BaseSensorOperator):
                 # run content check on response
                 return self.response_check(response)
         except AirflowException as ae:
-            if ae.message.startswith("404"):
+            if str(ae).startswith("404"):
                 return False
 
             raise ae