Method
__exit__
(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
Tested by
no test coverage detected