[ytdl] ignore SyntaxErrors when trying to import a module
This commit is contained in:
@@ -18,7 +18,7 @@ def import_module(module_name):
|
||||
if module_name is None:
|
||||
try:
|
||||
return __import__("yt_dlp")
|
||||
except ImportError:
|
||||
except (ImportError, SyntaxError):
|
||||
return __import__("youtube_dl")
|
||||
return __import__(module_name.replace("-", "_"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user