diff options
author | Aaron Zeng <zeng.aaron.l@gmail.com> | 2021-01-13 23:46:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 11:46:07 +0700 |
commit | 8e5477d036319adee98a6a7f95fc0ba09bb7b28c (patch) | |
tree | 8f95ff8c52554a2dc2e7d9a1dceb735b7fb530a9 /youtube_dl/YoutubeDL.py | |
parent | 1e8e5d5238b4863aa2005d1cd5981343d96bdbf3 (diff) |
[YoutubeDL] Ignore failure to create existing directory (#27811)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |