mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
requests_cache compatibility
This commit is contained in:
parent
4c2c1d763a
commit
2252ea5cfa
@ -128,7 +128,8 @@ class Spotify(object):
|
|||||||
raise SpotifyException(r.status_code,
|
raise SpotifyException(r.status_code,
|
||||||
-1, '%s:\n %s' % (r.url, 'error'), headers=r.headers)
|
-1, '%s:\n %s' % (r.url, 'error'), headers=r.headers)
|
||||||
finally:
|
finally:
|
||||||
r.connection.close()
|
if hasattr(r, "connection"):
|
||||||
|
r.connection.close()
|
||||||
if r.text and len(r.text) > 0 and r.text != 'null':
|
if r.text and len(r.text) > 0 and r.text != 'null':
|
||||||
results = r.json()
|
results = r.json()
|
||||||
if self.trace: # pragma: no cover
|
if self.trace: # pragma: no cover
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user