Check if TarFile is still open, and if the operation's mode corresponds to TarFile's mode.
(self, mode=None)
| 2931 | self._loaded = True |
| 2932 | |
| 2933 | def _check(self, mode=None): |
| 2934 | """Check if TarFile is still open, and if the operation's mode |
| 2935 | corresponds to TarFile's mode. |
| 2936 | """ |
| 2937 | if self.closed: |
| 2938 | raise OSError("%s is closed" % self.__class__.__name__) |
| 2939 | if mode is not None and self.mode not in mode: |
| 2940 | raise OSError("bad operation for mode %r" % self.mode) |
| 2941 | |
| 2942 | def _find_link_target(self, tarinfo): |
| 2943 | """Find the target member of a symlink or hardlink member in the |
no outgoing calls
no test coverage detected