Skip to content

Commit e82e1cc

Browse files
sander-goossusodapop
authored andcommitted
Additional fix to initialise connection.open to False
Additional fix to define and initialise the `connection.open` var to False earlier, to prevent the following error: ``` Traceback (most recent call last): File "/Users/sander.goos/opt/anaconda3/envs/pysql-2.0.2/lib/python3.9/site-packages/databricks/sql/client.py", line 124, in __del__ if self.open: AttributeError: 'Connection' object has no attribute 'open' ``` Integration tests.
1 parent 57dab55 commit e82e1cc

File tree

1 file changed

+1
-0
lines changed
  • cmdexec/clients/python/src/databricks/sql

1 file changed

+1
-0
lines changed

cmdexec/clients/python/src/databricks/sql/client.py

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(self,
8383
# Databricks runtime will return native Arrow types for timestamps instead of Arrow strings
8484
# (True by default)
8585

86+
self.open = False
8687
self.host = server_hostname
8788
self.port = kwargs.get("_port", 443)
8889
self.disable_pandas = kwargs.get("_disable_pandas", False)

0 commit comments

Comments
 (0)