Skip to content

Commit 6b8d2ee

Browse files
committed
fix
1 parent a627aa8 commit 6b8d2ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyiceberg/catalog/hive.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ def _client(self) -> Client:
165165
return client
166166

167167
def __enter__(self) -> Client:
168-
"""Reinitialize transport if was closed."""
169-
if self._transport and not self._transport.isOpen():
168+
"""Make sure the transport is initialized and open."""
169+
if not self._transport:
170170
self._transport = self._init_thrift_transport()
171+
if not self._transport.isOpen():
171172
self._transport.open()
172173
return self._client
173174

0 commit comments

Comments
 (0)