mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-12 17:10:45 +00:00
Merge pull request #392 from TimJay/master
requests_cache compatibility
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -133,7 +133,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
|
||||||
|
|||||||
Reference in new issue
Block a user