(self, f)
| 444 | _file = None |
| 445 | |
| 446 | def __init__(self, f): |
| 447 | self._i_opened_the_file = None |
| 448 | if isinstance(f, str): |
| 449 | f = builtins.open(f, 'wb') |
| 450 | self._i_opened_the_file = f |
| 451 | try: |
| 452 | self.initfp(f) |
| 453 | except: |
| 454 | if self._i_opened_the_file: |
| 455 | f.close() |
| 456 | raise |
| 457 | |
| 458 | def initfp(self, file): |
| 459 | self._file = file |
nothing calls this directly
no test coverage detected