mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-17 06:09:46 +00:00
formatting
This commit is contained in:
parent
93f8ffdad0
commit
e25a148568
@ -451,16 +451,10 @@ def validate_response(response: PoTokenResponse | None):
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
return (
|
||||
response.expires_at is None
|
||||
or (
|
||||
isinstance(response.expires_at, int)
|
||||
and (
|
||||
response.expires_at <= 0
|
||||
or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
|
||||
)
|
||||
)
|
||||
)
|
||||
if not isinstance(response.expires_at, int):
|
||||
return response.expires_at is None
|
||||
|
||||
return response.expires_at <= 0 or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
|
||||
|
||||
|
||||
def validate_cache_spec(spec: PoTokenCacheSpec):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user