johnslavik commented on code in PR #59770:
URL: https://github.com/apache/airflow/pull/59770#discussion_r2644334756
##########
providers/celery/src/airflow/providers/celery/cli/celery_command.py:
##########
@@ -135,7 +135,8 @@ def _run_stale_bundle_cleanup():
try:
yield
finally:
- return
+ pass # ignore any problems
+ return
Review Comment:
This is tricky -- it causes all exceptions to be bubbled up, not ignored!
`finally-pass` is essentially a no-op.
Instead, I suggest:
```suggestion
with suppress(BaseException):
yield
return
```
(`suppress` is already used a few lines up)
##########
providers/celery/src/airflow/providers/celery/cli/celery_command.py:
##########
@@ -135,7 +135,8 @@ def _run_stale_bundle_cleanup():
try:
yield
finally:
- return
+ pass # ignore any problems
+ return
Review Comment:
This is tricky -- it causes all exceptions to be bubbled up, not ignored!
`finally-pass` is essentially a no-op.
Instead, I suggest:
```suggestion
with suppress(BaseException):
yield
return
```
(`suppress` is already being used a few lines up)
--
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]