You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/07 21:50:56 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #6749: [AIRFLOW-6193] Do not use asserts in Airflow main code

mik-laj commented on a change in pull request #6749: [AIRFLOW-6193] Do not use asserts in Airflow main code
URL: https://github.com/apache/airflow/pull/6749#discussion_r355145830
 
 

 ##########
 File path: airflow/api/common/experimental/trigger_dag.py
 ##########
 @@ -54,7 +54,8 @@ def _trigger_dag(
 
     execution_date = execution_date if execution_date else timezone.utcnow()
 
-    assert timezone.is_localized(execution_date)
+    if not timezone.is_localized(execution_date):
+        raise ValueError("The execution_date shoudl be localized")
 
 Review comment:
   ```suggestion
           raise ValueError("The execution_date should be localized")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services