mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[core] Fix --ignore-no-formats-error
(#10345)
Fixes regression in 5ce582448e
Closes #10344
Authored by: Grub4K
Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
parent
d28aa87e21
commit
cc767e9490
1 changed files with 3 additions and 0 deletions
|
@ -5120,6 +5120,9 @@ class _UnsafeExtensionError(Exception):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def sanitize_extension(cls, extension, /, *, prepend=False):
|
def sanitize_extension(cls, extension, /, *, prepend=False):
|
||||||
|
if extension is None:
|
||||||
|
return None
|
||||||
|
|
||||||
if '/' in extension or '\\' in extension:
|
if '/' in extension or '\\' in extension:
|
||||||
raise cls(extension)
|
raise cls(extension)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue