mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
address review: replace assert in _auth with explicit RuntimeError
Assertions can be disabled at runtime, so use an explicit check and raise instead — matches how driver creation failure is already handled. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -561,7 +561,8 @@ class WebDriverSelenium(WebDriverProxy):
|
||||
|
||||
def _auth(self, user: User) -> None:
|
||||
"""Authenticate the persistent driver in-place."""
|
||||
assert self._driver is not None
|
||||
if self._driver is None:
|
||||
raise RuntimeError("WebDriver is not initialized")
|
||||
machine_auth_provider_factory.instance.authenticate_webdriver(
|
||||
self._driver, user
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user