kopia lustrzana https://github.com/halcy/Mastodon.py
pull/112/head
rodzic
4d99e9316e
commit
050077e97a
|
@ -1227,7 +1227,9 @@ class Mastodon:
|
||||||
|
|
||||||
# See if the returned dict is an error dict even though status is 200
|
# See if the returned dict is an error dict even though status is 200
|
||||||
if isinstance(response, dict) and 'error' in response:
|
if isinstance(response, dict) and 'error' in response:
|
||||||
raise MastodonAPIError("Mastodon API returned error: " + str(response['error']))
|
if not isinstance(response['error'], six.string_types):
|
||||||
|
response['error'] = six.text_type(response['error'])
|
||||||
|
raise MastodonAPIError("Mastodon API returned error: " + response['error'])
|
||||||
|
|
||||||
# Parse link headers
|
# Parse link headers
|
||||||
if isinstance(response, list) and \
|
if isinstance(response, list) and \
|
||||||
|
|
Ładowanie…
Reference in New Issue