aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mastodon/Mastodon.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index ef428d2..f6b9f1c 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -3407,8 +3407,11 @@ class Mastodon:
3407 self.ratelimit_limit = int(response_object.headers['X-RateLimit-Limit']) 3407 self.ratelimit_limit = int(response_object.headers['X-RateLimit-Limit'])
3408 3408
3409 try: 3409 try:
3410 ratelimit_reset_datetime = dateutil.parser.parse(response_object.headers['X-RateLimit-Reset']) 3410 if str(int(response_object.headers['X-RateLimit-Reset'])) == response_object.headers['X-RateLimit-Reset']:
3411 self.ratelimit_reset = self.__datetime_to_epoch(ratelimit_reset_datetime) 3411 self.ratelimit_reset = int(response_object.headers['X-RateLimit-Reset'])
3412 else:
3413 ratelimit_reset_datetime = dateutil.parser.parse(response_object.headers['X-RateLimit-Reset'])
3414 self.ratelimit_reset = self.__datetime_to_epoch(ratelimit_reset_datetime)
3412 3415
3413 # Adjust server time to local clock 3416 # Adjust server time to local clock
3414 if 'Date' in response_object.headers: 3417 if 'Date' in response_object.headers:
Powered by cgit v1.2.3 (git 2.41.0)