move _jwt_is_expired to utils

This commit is contained in:
Michaël De Boey
2025-03-16 23:40:50 +01:00
parent 98a68be9b8
commit 1b1117a9c5
12 changed files with 32 additions and 22 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
from .wrestleuniverse import WrestleUniverseBaseIE
from ..utils import (
int_or_none,
jwt_is_expired,
traverse_obj,
url_or_none,
)
@@ -20,7 +21,7 @@ class StacommuBaseIE(WrestleUniverseBaseIE):
@WrestleUniverseBaseIE._TOKEN.getter
def _TOKEN(self):
if self._REAL_TOKEN and self._jwt_is_expired(self._REAL_TOKEN):
if self._REAL_TOKEN and jwt_is_expired(self._REAL_TOKEN):
self._refresh_token()
return self._REAL_TOKEN