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

This commit is contained in:
Aaron Zeng 2021-02-26 16:12:22 +01:00 committed by Laura Liberda
parent 5b7e334c86
commit e225806484

View file

@ -1783,6 +1783,8 @@ class HaruhiDL(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