Set modification time of targetpath according to tarinfo.
(self, tarinfo, targetpath)
| 2801 | raise ExtractError("could not change mode") from e |
| 2802 | |
| 2803 | def utime(self, tarinfo, targetpath): |
| 2804 | """Set modification time of targetpath according to tarinfo. |
| 2805 | """ |
| 2806 | mtime = tarinfo.mtime |
| 2807 | if mtime is None: |
| 2808 | return |
| 2809 | if not hasattr(os, 'utime'): |
| 2810 | return |
| 2811 | try: |
| 2812 | os.utime(targetpath, (mtime, mtime)) |
| 2813 | except OSError as e: |
| 2814 | raise ExtractError("could not change modification time") from e |
| 2815 | |
| 2816 | #-------------------------------------------------------------------------- |
| 2817 | def next(self): |