Make a directory called targetpath.
(self, tarinfo, targetpath)
| 2655 | # subclass to implement other functionality. |
| 2656 | |
| 2657 | def makedir(self, tarinfo, targetpath): |
| 2658 | """Make a directory called targetpath. |
| 2659 | """ |
| 2660 | try: |
| 2661 | if tarinfo.mode is None: |
| 2662 | # Use the system's default mode |
| 2663 | os.mkdir(targetpath) |
| 2664 | else: |
| 2665 | # Use a safe mode for the directory, the real mode is set |
| 2666 | # later in _extract_member(). |
| 2667 | os.mkdir(targetpath, 0o700) |
| 2668 | except FileExistsError: |
| 2669 | if not os.path.isdir(targetpath): |
| 2670 | raise |
| 2671 | |
| 2672 | def makefile(self, tarinfo, targetpath): |
| 2673 | """Make a file called targetpath. |
no test coverage detected