Skip to content

Commit d788c8d

Browse files
committed
fix
1 parent f40e75f commit d788c8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyiceberg/catalog/hive.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ def _client(self) -> Client:
166166
return client
167167

168168
def __enter__(self) -> Client:
169-
"""Reinitialize transport if was closed."""
170-
if self._transport and not self._transport.isOpen():
169+
"""Make sure the transport is initialized and open."""
170+
if not self._transport:
171171
self._transport = self._init_thrift_transport()
172+
if not self._transport.isOpen():
172173
self._transport.open()
173174
return self._client
174175

0 commit comments

Comments
 (0)