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