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

pull/27825/head
Aaron Zeng 4 years ago committed by GitHub
parent 1e8e5d5238
commit 8e5477d036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save