From 95cdbae6c6d3e9eb9b9fe832d8fd9b68e77c78c0 Mon Sep 17 00:00:00 2001 From: Tyler Flowers Date: Sun, 22 Mar 2026 16:41:28 -0400 Subject: [PATCH] Address a few lint issues --- backend/download/src/yt_dlp_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/download/src/yt_dlp_base.py b/backend/download/src/yt_dlp_base.py index c5b866c1..14f7c398 100644 --- a/backend/download/src/yt_dlp_base.py +++ b/backend/download/src/yt_dlp_base.py @@ -117,7 +117,7 @@ class YtWrap: if (res.text == ""): raise ConnectionError("Gluetun has not connected to VPN yet") break - except: + except (ConnectionError, requests.exceptions.HTTPError): swap_attempt += 1 if (swap_attempt == 5): raise ConnectionError("Gluetun could not connect to VPN!") @@ -129,7 +129,7 @@ class YtWrap: with yt_dlp.YoutubeDL(self.obs) as ydl: max_attempts = self.config["downloads"].get("gluetun_attempts") inf = False - if max_attempts == 0 or max_attempts == None: + if max_attempts == 0 or max_attempts is None: inf = True max_attempts = 0 attempt = 0 @@ -166,7 +166,7 @@ class YtWrap: with yt_dlp.YoutubeDL(self.obs) as ydl: max_attempts = self.config["downloads"].get("gluetun_attempts") inf = False - if max_attempts == 0 or max_attempts == None: + if max_attempts == 0 or max_attempts is None: inf = True max_attempts = 0 attempt = 0