Make a directory called targetpath.
(self, tarinfo, targetpath)
| 2636 | # subclass to implement other functionality. |
| 2637 | |
| 2638 | def makedir(self, tarinfo, targetpath): |
| 2639 | """Make a directory called targetpath. |
| 2640 | """ |
| 2641 | try: |
| 2642 | if tarinfo.mode is None: |
| 2643 | # Use the system's default mode |
| 2644 | os.mkdir(targetpath) |
| 2645 | else: |
| 2646 | # Use a safe mode for the directory, the real mode is set |
| 2647 | # later in _extract_member(). |
| 2648 | os.mkdir(targetpath, 0o700) |
| 2649 | except FileExistsError: |
| 2650 | if not os.path.isdir(targetpath): |
| 2651 | raise |
| 2652 | |
| 2653 | def makefile(self, tarinfo, targetpath): |
| 2654 | """Make a file called targetpath. |
no test coverage detected