SameerMesiah97 commented on code in PR #62312:
URL: https://github.com/apache/airflow/pull/62312#discussion_r2936841385
##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -502,10 +503,8 @@ def get_variable_from_secrets(key: str, team_name: str |
None = None) -> str | N
# check cache first
# enabled only if SecretCache.init() has been called first
- try:
+ with suppress(SecretCache.NotPresentException):
Review Comment:
I would add this comment below:
`# Suppress it so we can fall back to iterating over the secrets backends.`
Using `suppress` reduces instead of try/except reduces explicitness here,
especially considering the fact that you removed the comment as well.
--
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]