Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53f67ce

Browse files
committed
Add none check on _oauth_persistence in DatabricksOAuthProvider
Add none check on _oauth_persistence in DatabricksOAuthProviderto avoid app crash when _oauth_persistence is None.
1 parent205f4b2 commit53f67ce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/databricks/sql/auth/authenticators.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ def _initial_get_token(self):
8888
)
8989
self._access_token=access_token
9090
self._refresh_token=refresh_token
91-
self._oauth_persistence.persist(
92-
self._hostname,OAuthToken(access_token,refresh_token)
93-
)
91+
92+
ifself._oauth_persistence:
93+
self._oauth_persistence.persist(
94+
self._hostname,OAuthToken(access_token,refresh_token)
95+
)
9496
exceptExceptionase:
9597
logging.error(f"unexpected error in oauth initialization",e,exc_info=True)
9698
raisee

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp