mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 17:43:52 +01:00
Codestyle
This commit is contained in:
parent
53d72c14ea
commit
2a4cf0d335
3 changed files with 3 additions and 12 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue