You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by fo...@apache.org on 2017/12/29 17:29:01 UTC
incubator-airflow git commit: Revert "Revert "[AIRFLOW-1955] Do not
reference unassigned variable""
Repository: incubator-airflow
Updated Branches:
refs/heads/master f434e2bd9 -> d44a82e59
Revert "Revert "[AIRFLOW-1955] Do not reference unassigned variable""
This reverts commit fdd7f43fe2aa64bc9001db4f2555c59d568e249a.
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/d44a82e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/d44a82e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/d44a82e5
Branch: refs/heads/master
Commit: d44a82e59153386d8a6172a1926c66c151e4fe32
Parents: f434e2b
Author: Fokko Driesprong <fo...@godatadriven.com>
Authored: Fri Dec 29 18:28:42 2017 +0100
Committer: Fokko Driesprong <fo...@godatadriven.com>
Committed: Fri Dec 29 18:28:42 2017 +0100
----------------------------------------------------------------------
airflow/utils/log/gcs_task_handler.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/d44a82e5/airflow/utils/log/gcs_task_handler.py
----------------------------------------------------------------------
diff --git a/airflow/utils/log/gcs_task_handler.py b/airflow/utils/log/gcs_task_handler.py
index f68165f..3b83c8c 100644
--- a/airflow/utils/log/gcs_task_handler.py
+++ b/airflow/utils/log/gcs_task_handler.py
@@ -138,10 +138,10 @@ class GCSTaskHandler(FileTaskHandler, LoggingMixin):
if append:
try:
old_log = self.gcs_read(remote_log_location)
+ log = '\n'.join([old_log, log]) if old_log else log
except Exception as e:
if not hasattr(e, 'resp') or e.resp.get('status') != '404':
- old_log = '*** Previous log discarded: {}\n\n'.format(str(e))
- log = '\n'.join([old_log, log]) if old_log else log
+ log = '*** Previous log discarded: {}\n\n'.format(str(e)) + log
try:
bkt, blob = self.parse_gcs_url(remote_log_location)