You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by al...@apache.org on 2016/12/22 21:34:29 UTC

incubator-airflow git commit: [AIRFLOW-712] Fix AIRFLOW-667 to use proper HTTP error properties

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 062354de0 -> edf55cd21


[AIRFLOW-712] Fix AIRFLOW-667 to use proper HTTP error properties

Closes #1955 from criccomini/AIRFLOW-712


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

Branch: refs/heads/master
Commit: edf55cd21e1d220c1d19031d7f1b8e666aad770c
Parents: 062354d
Author: Chris Riccomini <ch...@wepay.com>
Authored: Thu Dec 22 22:31:50 2016 +0100
Committer: Alex Van Boxel <al...@vanboxel.be>
Committed: Thu Dec 22 22:32:06 2016 +0100

----------------------------------------------------------------------
 airflow/contrib/hooks/bigquery_hook.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/edf55cd2/airflow/contrib/hooks/bigquery_hook.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/hooks/bigquery_hook.py b/airflow/contrib/hooks/bigquery_hook.py
index 1a33a0a..450ee7a 100644
--- a/airflow/contrib/hooks/bigquery_hook.py
+++ b/airflow/contrib/hooks/bigquery_hook.py
@@ -490,12 +490,12 @@ class BigQueryBaseCursor(object):
                     time.sleep(5)
 
             except HttpError as err:
-                if err.code in [500, 503]:
-                    logging.info('%s: Retryable error, waiting for job to complete: %s', err.code, job_id)
+                if err.resp.status in [500, 503]:
+                    logging.info('%s: Retryable error, waiting for job to complete: %s', err.resp.status, job_id)
                     time.sleep(5)
                 else:
                     raise Exception(
-                'BigQuery job status check faild. Final error was: %s', err.code)
+                        'BigQuery job status check failed. Final error was: %s', err.resp.status)
 
         return job_id