0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

Ignore invalid dates (Fixes #894)

This commit is contained in:
Philipp Hagemeister 2013-06-19 22:13:16 +02:00
parent 213b715893
commit bb47437686

View file

@ -322,6 +322,9 @@ def try_utime(self, filename, last_modified_hdr):
filetime = timeconvert(timestr)
if filetime is None:
return filetime
# Ignore obviously invalid dates
if filetime == 0:
return
try:
os.utime(filename, (time.time(), filetime))
except: