mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: enable ruff lint rule TRY201 and B904 to improve raise stack traces (#29166)
This commit is contained in:
committed by
GitHub
parent
5167d20f27
commit
4bb2e2f8af
@@ -68,7 +68,7 @@ class CreateDatabaseCommand(BaseCommand):
|
||||
engine=self._properties.get("sqlalchemy_uri", "").split(":")[0],
|
||||
)
|
||||
# So we can show the original message
|
||||
raise ex
|
||||
raise
|
||||
except Exception as ex:
|
||||
event_logger.log_with_context(
|
||||
action=f"db_creation_failed.{ex.__class__.__name__}",
|
||||
@@ -141,7 +141,7 @@ class CreateDatabaseCommand(BaseCommand):
|
||||
engine=self._properties.get("sqlalchemy_uri", "").split(":")[0],
|
||||
)
|
||||
# So we can show the original message
|
||||
raise ex
|
||||
raise
|
||||
except (
|
||||
DAOCreateFailedError,
|
||||
DatabaseInvalidError,
|
||||
|
||||
Reference in New Issue
Block a user