From: Aaron Zeng Date: Thu, 14 Jan 2021 04:46:07 +0000 (-0500) Subject: [YoutubeDL] Ignore failure to create existing directory (#27811) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=8e5477d036319adee98a6a7f95fc0ba09bb7b28c;p=youtube-dl [YoutubeDL] Ignore failure to create existing directory (#27811) --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 3f1f03379..0ed4bc6ba 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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