MCPcopy Index your code
hub / github.com/RustPython/RustPython / __exit__

Method __exit__

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

Source from the content-addressed store, hash-verified

3000 return self
3001
3002 def __exit__(self, type, value, traceback):
3003 if type is None:
3004 self.close()
3005 else:
3006 # An exception occurred. We must not call close() because
3007 # it would try to write end-of-archive blocks and padding.
3008 if not self._extfileobj:
3009 self.fileobj.close()
3010 self.closed = True
3011
3012#--------------------
3013# exported functions

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected