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