We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f85ff9 commit 7b21b5bCopy full SHA for 7b21b5b
1 file changed
pyiceberg/catalog/hive.py
@@ -166,9 +166,10 @@ def _client(self) -> Client:
166
return client
167
168
def __enter__(self) -> Client:
169
- """Reinitialize transport if was closed."""
170
- if self._transport and not self._transport.isOpen():
+ """Make sure the transport is initialized and open."""
+ if not self._transport:
171
self._transport = self._init_thrift_transport()
172
+ if not self._transport.isOpen():
173
self._transport.open()
174
return self._client
175
0 commit comments