mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Close the connection when done
This commit is contained in:
parent
c944cc772f
commit
660f34b343
@ -102,6 +102,8 @@ class Spotify(object):
|
||||
except:
|
||||
raise SpotifyException(r.status_code,
|
||||
-1, '%s:\n %s' % (r.url, r.json()['error']['message']))
|
||||
finally:
|
||||
r.connection.close()
|
||||
if len(r.text) > 0:
|
||||
results = r.json()
|
||||
if self.trace: # pragma: no cover
|
||||
|
Loading…
Reference in New Issue
Block a user