MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __exit__

Method __exit__

tools/python-3.11.9-amd64/Lib/tarfile.py:2767–2775  ·  view source on GitHub ↗
(self, type, value, traceback)

Source from the content-addressed store, hash-verified

2765 return self
2766
2767 def __exit__(self, type, value, traceback):
2768 if type is None:
2769 self.close()
2770 else:
2771 # An exception occurred. We must not call close() because
2772 # it would try to write end-of-archive blocks and padding.
2773 if not self._extfileobj:
2774 self.fileobj.close()
2775 self.closed = True
2776
2777#--------------------
2778# exported functions

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected