Set modification time of targetpath according to tarinfo.
(self, tarinfo, targetpath)
| 2826 | raise ExtractError("could not change mode") from e |
| 2827 | |
| 2828 | def utime(self, tarinfo, targetpath): |
| 2829 | """Set modification time of targetpath according to tarinfo. |
| 2830 | """ |
| 2831 | mtime = tarinfo.mtime |
| 2832 | if mtime is None: |
| 2833 | return |
| 2834 | if not hasattr(os, 'utime'): |
| 2835 | return |
| 2836 | try: |
| 2837 | os.utime(targetpath, (mtime, mtime)) |
| 2838 | except OSError as e: |
| 2839 | raise ExtractError("could not change modification time") from e |
| 2840 | |
| 2841 | #-------------------------------------------------------------------------- |
| 2842 | def next(self): |