Skip to content

Commit 39294e9

Browse files
fix: ensure open attribute of Connection never fails
in case the openSession takes long, the initialisation of the session will not complete immediately. This could make the session attribute inaccessible. If the Connection is deleted in this time, the open() check will throw because the session attribute does not exist. Thus, we default to the Connection being closed in this case. This was not an issue before because open was a direct attribute of the Connection class. Caught in the integration tests. Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 7a2f9b5 commit 39294e9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/databricks/sql/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
OperationalError,
2020
SessionAlreadyClosedError,
2121
CursorAlreadyClosedError,
22-
Error,
23-
NotSupportedError,
2422
)
2523
from databricks.sql.thrift_api.TCLIService import ttypes
2624
from databricks.sql.backend.thrift_backend import ThriftDatabricksClient

0 commit comments

Comments
 (0)