[websocket] Make syntax error in `websockets` module non-fatal

Closes 
pull/2682/head
pukkandan 2022-02-04 10:32:44 +05:30
rodzic 22219f2d1f
commit 1e5d87beee
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0F00D95A001F4698
1 zmienionych plików z 5 dodań i 2 usunięć
yt_dlp/downloader

Wyświetl plik

@ -5,9 +5,12 @@ import threading
try:
import websockets
has_websockets = True
except ImportError:
except (ImportError, SyntaxError):
# websockets 3.10 on python 3.6 causes SyntaxError
# See https://github.com/yt-dlp/yt-dlp/issues/2633
has_websockets = False
else:
has_websockets = True
from .common import FileDownloader
from .external import FFmpegFD