Fix text attribute for Response object (#811)

* Fix text attribute for Response object

* Add a changelog for the AttributeError PR
This commit is contained in:
Mohammad Momeni 2022-06-19 02:47:58 +04:30 committed by GitHub
parent c1a85f1469
commit 72a6cd9190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed URI handling in `client.Spotify._get_id()` to remove qureies if provided by error. * Changed URI handling in `client.Spotify._get_id()` to remove qureies if provided by error.
* Added a new parameter to `RedisCacheHandler` to allow custom keys (instead of the default `token_info` key) * Added a new parameter to `RedisCacheHandler` to allow custom keys (instead of the default `token_info` key)
* Simplify check for existing token in `RedisCacheHandler` * Simplify check for existing token in `RedisCacheHandler`
* Fix `AttributeError` for `text` attribute of the `Response` object
### Changed ### Changed
* Removed Python 3.5 and added Python 3.9 in Github Action * Removed Python 3.5 and added Python 3.9 in Github Action

View File

@ -140,7 +140,7 @@ class SpotifyAuthBase(object):
# then try do decode it into text # then try do decode it into text
# if we receive an empty string (which is falsy), then replace it with `None` # if we receive an empty string (which is falsy), then replace it with `None`
error = response.txt or None error = response.text or None
error_description = None error_description = None
raise SpotifyOauthError( raise SpotifyOauthError(