small health fix

This commit is contained in:
halcy 2022-11-15 10:46:23 +02:00
parent cfcc6bccc7
commit dfabae2f54
2 changed files with 3 additions and 3 deletions

View File

@ -23,6 +23,7 @@ v1.6.0
* Added a method to revoke oauth tokens (thanks fluffy-critter) * Added a method to revoke oauth tokens (thanks fluffy-critter)
* Fixes * Fixes
* Various small and big fixes, improving reliablity and test coverage * Various small and big fixes, improving reliablity and test coverage
* Changed health APIs to work with newer Mastodon versions
* Changed URLs from "tootsuite" to "mastodon" in several places (thanks andypiper) * Changed URLs from "tootsuite" to "mastodon" in several places (thanks andypiper)
* Fixed some fields not converting to datetimes (thanks SouthFox-D) * Fixed some fields not converting to datetimes (thanks SouthFox-D)
* Improved oauth web flow support * Improved oauth web flow support

View File

@ -3341,9 +3341,8 @@ class Mastodon:
""" """
Returns without True if streaming API is okay, False or raises an error otherwise. Returns without True if streaming API is okay, False or raises an error otherwise.
""" """
api_okay = self.__api_request( api_okay = self.__api_request('GET', '/api/v1/streaming/health', base_url_override=self.__get_streaming_base(), parse=False)
'GET', '/api/v1/streaming/health', base_url_override=self.__get_streaming_base(), parse=False) if api_okay in [b'OK', b'success']:
if api_okay == b'OK':
return True return True
return False return False