Codestyle

This commit is contained in:
Lev Gorodetskiy 2024-05-26 11:55:30 -03:00
parent 53d72c14ea
commit 2a4cf0d335
No known key found for this signature in database
3 changed files with 3 additions and 12 deletions

View file

@ -142,10 +142,7 @@ class AcousticPlugin(plugins.BeetsPlugin):
self._log.debug("fetching URL: {}", url)
try:
res = requests.get(
url,
timeout=10,
)
res = requests.get(url, timeout=10)
except requests.RequestException as exc:
self._log.info("request error: {}", exc)
return {}

View file

@ -135,10 +135,7 @@ def get_user(host, port, username):
:rtype: list
"""
url = api_url(host, port, "/Users/Public")
r = requests.get(
url,
timeout=10,
)
r = requests.get(url, timeout=10)
user = [i for i in r.json() if i["Name"] == username]
return user

View file

@ -1069,10 +1069,7 @@ class Spotify(RemoteArtSource):
self._log.debug("Fetchart: no Spotify album ID found")
return
try:
response = requests.get(
url,
timeout=10,
)
response = requests.get(url, timeout=10)
response.raise_for_status()
except requests.RequestException as e:
self._log.debug("Error: " + str(e))