equal
deleted
inserted
replaced
784 |
784 |
785 Do not instantiate outside the vfs layer. |
785 Do not instantiate outside the vfs layer. |
786 """ |
786 """ |
787 |
787 |
788 def __init__(self, fh, closer) -> None: |
788 def __init__(self, fh, closer) -> None: |
789 super(delayclosedfile, self).__init__(fh) |
789 super().__init__(fh) |
790 object.__setattr__(self, '_closer', closer) |
790 object.__setattr__(self, '_closer', closer) |
791 |
791 |
792 def __exit__(self, exc_type, exc_value, exc_tb) -> None: |
792 def __exit__(self, exc_type, exc_value, exc_tb) -> None: |
793 self._closer.close(self._origfh) |
793 self._closer.close(self._origfh) |
794 |
794 |
898 |
898 |
899 Do not instantiate outside the vfs layer. |
899 Do not instantiate outside the vfs layer. |
900 """ |
900 """ |
901 |
901 |
902 def __init__(self, fh) -> None: |
902 def __init__(self, fh) -> None: |
903 super(checkambigatclosing, self).__init__(fh) |
903 super().__init__(fh) |
904 object.__setattr__(self, '_oldstat', util.filestat.frompath(fh.name)) |
904 object.__setattr__(self, '_oldstat', util.filestat.frompath(fh.name)) |
905 |
905 |
906 def _checkambig(self) -> None: |
906 def _checkambig(self) -> None: |
907 oldstat = self._oldstat |
907 oldstat = self._oldstat |
908 if oldstat.stat: |
908 if oldstat.stat: |