MCPcopy Index your code
hub / github.com/python/cpython / __exit__

Method __exit__

Lib/tarfile.py:3027–3035  ·  view source on GitHub ↗
(self, type, value, traceback)

Source from the content-addressed store, hash-verified

3025 return self
3026
3027 def __exit__(self, type, value, traceback):
3028 if type is None:
3029 self.close()
3030 else:
3031 # An exception occurred. We must not call close() because
3032 # it would try to write end-of-archive blocks and padding.
3033 if not self._extfileobj:
3034 self.fileobj.close()
3035 self.closed = True
3036
3037#--------------------
3038# exported functions

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected