Skip to content
Prev Previous commit
Next Next commit
refactor: use _close_current_writer on exit
  • Loading branch information
felixscherz committed Aug 5, 2024
commit d010fd453c4376e0a3918ba05e73daadecc935c9
3 changes: 1 addition & 2 deletions pyiceberg/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,8 @@ def __exit__(
exc_value: Optional[BaseException],
traceback: Optional[TracebackType],
) -> None:
self._close_current_writer()
self.closed = True
if self._current_writer:
self._current_writer.__exit__(exc_type, exc_value, traceback)

def _get_current_writer(self) -> ManifestWriter:
if self._should_roll_to_new_file():
Expand Down