BasPH commented on a change in pull request #4705: [AIRFLOW-3743] Unify
different methods of working out AIRFLOW_HOME
URL: https://github.com/apache/airflow/pull/4705#discussion_r256547921
##########
File path: airflow/configuration.py
##########
@@ -530,6 +530,25 @@ def parameterized_config(template):
conf.read(AIRFLOW_CONFIG)
+if 'AIRFLOW_HOME' in os.environ:
+ if conf.has_option('core', 'AIRFLOW_HOME'):
Review comment:
Since you check this within both the if and the else, you could place it at
the top, and check for `AIRFLOW_HOME` env var inside, to get rid of 1 if
statement:
```
if conf.has_option('core', 'AIRFLOW_HOME'):
if 'AIRFLOW_HOME' in os.environ:
...
else:
...
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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