Address a few lint issues

This commit is contained in:
Tyler Flowers 2026-03-22 16:41:28 -04:00 committed by GitHub
parent eec617a610
commit 95cdbae6c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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