Make a directory called targetpath.
(self, tarinfo, targetpath)
| 2434 | # subclass to implement other functionality. |
| 2435 | |
| 2436 | def makedir(self, tarinfo, targetpath): |
| 2437 | """Make a directory called targetpath. |
| 2438 | """ |
| 2439 | try: |
| 2440 | if tarinfo.mode is None: |
| 2441 | # Use the system's default mode |
| 2442 | os.mkdir(targetpath) |
| 2443 | else: |
| 2444 | # Use a safe mode for the directory, the real mode is set |
| 2445 | # later in _extract_member(). |
| 2446 | os.mkdir(targetpath, 0o700) |
| 2447 | except FileExistsError: |
| 2448 | if not os.path.isdir(targetpath): |
| 2449 | raise |
| 2450 | |
| 2451 | def makefile(self, tarinfo, targetpath): |
| 2452 | """Make a file called targetpath. |
no test coverage detected