You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/09/08 12:46:31 UTC

incubator-airflow git commit: [AIRFLOW-1580] Error in string formating

Repository: incubator-airflow
Updated Branches:
  refs/heads/master f3258bb53 -> ea9ab96cb


[AIRFLOW-1580] Error in string formating

The string formatting should be done on the
string, and not on the
exception that is being raised.

Closes #2583 from Fokko/AIRFLOW-1580-error-in-
checkout-operator


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

Branch: refs/heads/master
Commit: ea9ab96cb71e79e15a6330561e7bf24f6e0ea2f9
Parents: f3258bb
Author: Fokko Driesprong <fo...@godatadriven.com>
Authored: Fri Sep 8 14:45:38 2017 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Fri Sep 8 14:45:38 2017 +0200

----------------------------------------------------------------------
 airflow/operators/check_operator.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/ea9ab96c/airflow/operators/check_operator.py
----------------------------------------------------------------------
diff --git a/airflow/operators/check_operator.py b/airflow/operators/check_operator.py
index 139e451..1cf50da 100644
--- a/airflow/operators/check_operator.py
+++ b/airflow/operators/check_operator.py
@@ -214,9 +214,9 @@ class IntervalCheckOperator(BaseOperator):
         logging.info('Executing SQL check: ' + self.sql1)
         row1 = hook.get_first(self.sql1)
         if not row2:
-            raise AirflowException("The query {q} returned None").format(q=self.sql2)
+            raise AirflowException("The query {q} returned None".format(q=self.sql2))
         if not row1:
-            raise AirflowException("The query {q} returned None").format(q=self.sql1)
+            raise AirflowException("The query {q} returned None".format(q=self.sql1))
         current = dict(zip(self.metrics_sorted, row1))
         reference = dict(zip(self.metrics_sorted, row2))
         ratios = {}