Add Python 3 compatibility fix In Python 3, errors donât 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 <[email protected]> Authored: Thu Jun 16 16:53:27 2016 -0400 Committer: jlowin <[email protected]> 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
