kaxil 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_r355152095
##########
File path: airflow/executors/executor_loader.py
##########
@@ -78,8 +78,9 @@ def _get_executor(executor_name: str) -> BaseExecutor:
from airflow import plugins_manager
plugins_manager.integrate_executor_plugins()
executor_path = executor_name.split('.')
- assert len(executor_path) == 2, f"Executor {executor_name} not
supported: " \
- f"please specify in format
plugin_module.executor"
-
- assert executor_path[0] in globals(), f"Executor {executor_name}
not supported"
+ if not len(executor_path) == 2:
Review comment:
```suggestion
if len(executor_path) != 2:
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services