From fe1ee23c7ceb087f05c4af9bc3b63926221e43c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Fri, 25 May 2018 13:47:37 +0000 Subject: [PATCH] Fix need_renew --- re2oapi/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2oapi/client.py b/re2oapi/client.py index b4b9567..3004750 100644 --- a/re2oapi/client.py +++ b/re2oapi/client.py @@ -58,7 +58,7 @@ class Re2oAPIClient: True is the token expiration time is within less than `TIME_FOR_RENEW` seconds """ - return self.token['expiration'] > \ + return self.token['expiration'] < \ datetime.datetime.now(datetime.timezone.utc) + \ datetime.timedelta(seconds=TIME_FOR_RENEW)