bito-code-review[bot] commented on PR #40559:
URL: https://github.com/apache/superset/pull/40559#issuecomment-4597509550
<!-- Bito Reply -->
The code currently imports `jsonify` inside the `except` block, which is
redundant and could lead to issues if the initial `flask` import fails. To fix
this, import `jsonify` once at the top of the file before the `try` block and
remove the redundant import inside the `except` block.
**superset/mcp_service/screenshot/webdriver_config.py**
```
from flask import jsonify
try:
# existing code
except Exception:
# use jsonify from the top-level import
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]