From 28c242d82c43d341a573e4d82468a27e1976a781 Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:02:48 +0000 Subject: [PATCH] null check for "self.ws" --- yt_dlp/downloader/niconico.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/downloader/niconico.py b/yt_dlp/downloader/niconico.py index 6ec2c87665..ecc57e8dc5 100644 --- a/yt_dlp/downloader/niconico.py +++ b/yt_dlp/downloader/niconico.py @@ -158,7 +158,8 @@ def ws_main(): yield self finally: stopped.set() - self.ws.close() + if self.ws: + self.ws.close() thread.join() def _master_m3u8_url(self):