uranusjr commented on code in PR #59666:
URL: https://github.com/apache/airflow/pull/59666#discussion_r2639040727
##########
shared/configuration/src/airflow_shared/configuration/parser.py:
##########
@@ -1079,13 +1079,14 @@ def getfloat(self, section: str, key: str, **kwargs) ->
float: # type: ignore[o
def getlist(self, section: str, key: str, delimiter=",", **kwargs):
"""Get config value as list."""
val = self.get(section, key, **kwargs)
- if val is None:
- if "fallback" in kwargs:
- return kwargs["fallback"]
- raise AirflowConfigException(
- f"Failed to convert value None to list. "
- f'Please check "{key}" key in "{section}" section is set.'
- )
+
+ if isinstance(val, list) or val is None:
+ # Given a fallback that was already a list, don't try to parse it
Review Comment:
This comment only applies to the `list` case right? Probably better if we
split this to two to make it clearer.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]