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-1794] Remove uses of Exception.message for Python 3
Date Fri, 10 Nov 2017 07:57:46 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/v1-9-test a8f3efa99 -> 3bc0b7d33


[AIRFLOW-1794] Remove uses of Exception.message for Python 3

Closes #2766 from dhuang/AIRFLOW-1794

(cherry picked from commit f5f7701258f858698562579cbfb4e1934056e009)
Signed-off-by: Bolke de Bruin <bolke@xs4all.nl>


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

Branch: refs/heads/v1-9-test
Commit: 3bc0b7d33b92758108c90c2afc411e4ea4358afe
Parents: a8f3efa
Author: Daniel Huang <dxhuang@gmail.com>
Authored: Fri Nov 10 08:57:22 2017 +0100
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Fri Nov 10 08:57:41 2017 +0100

----------------------------------------------------------------------
 airflow/hooks/webhdfs_hook.py | 2 +-
 airflow/www/views.py          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3bc0b7d3/airflow/hooks/webhdfs_hook.py
----------------------------------------------------------------------
diff --git a/airflow/hooks/webhdfs_hook.py b/airflow/hooks/webhdfs_hook.py
index 4510d29..35d4e33 100644
--- a/airflow/hooks/webhdfs_hook.py
+++ b/airflow/hooks/webhdfs_hook.py
@@ -61,7 +61,7 @@ class WebHDFSHook(BaseHook):
                 return client
             except HdfsError as e:
                 self.log.debug(
-                    "Read operation on namenode {nn.host} failed witg error: {e.message}".format(**locals())
+                    "Read operation on namenode {nn.host} failed with error: {e}".format(**locals())
                 )
         nn_hosts = [c.host for c in nn_connections]
         no_nn_error = "Read operations failed on the namenodes below:\n{}".format("\n".join(nn_hosts))

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3bc0b7d3/airflow/www/views.py
----------------------------------------------------------------------
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 960a0d1..63af88f 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -712,7 +712,7 @@ class Airflow(BaseView):
                 logs = handler.read(ti)
             except AttributeError as e:
                 logs = ["Task log handler {} does not support read logs.\n{}\n" \
-                            .format(task_log_reader, e.message)]
+                            .format(task_log_reader, str(e))]
 
         for i, log in enumerate(logs):
             if PY2 and not isinstance(log, unicode):


Mime
View raw message