From 872ed88158f2cc62ca49cd6d3741d740605b6502 Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Sun, 9 Jan 2022 08:25:31 +0100 Subject: [PATCH] [sonic-package-manager] Drop 'expires_in' The 'expires_in' attribute for tokens is defined as optional and some Docker repositories (notably ghcr.io) do not set it. Since 'expires_in' is not used anywhere in the code, we simply drop it. Signed-off-by: Christian Svensson --- sonic_package_manager/registry.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sonic_package_manager/registry.py b/sonic_package_manager/registry.py index 5cac5469bf..7351323570 100644 --- a/sonic_package_manager/registry.py +++ b/sonic_package_manager/registry.py @@ -43,10 +43,9 @@ def get_token(bearer: Dict) -> str: content = json.loads(response.content) token = content['token'] - expires_in = content['expires_in'] log.debug(f'authentication token for bearer={bearer}: ' - f'token={token} expires_in={expires_in}') + f'token={token}') return token