1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-21 17:51:51 +00:00

[YoutubeDL] Ignore failure to create existing directory (#27811)

This commit is contained in:
Aaron Zeng 2021-01-13 23:46:07 -05:00 committed by GitHub
parent 1e8e5d5238
commit 8e5477d036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1779,6 +1779,8 @@ class YoutubeDL(object):
os.makedirs(dn)
return True
except (OSError, IOError) as err:
if isinstance(err, OSError) and err.errno == errno.EEXIST:
return True
self.report_error('unable to create directory ' + error_to_compat_str(err))
return False