From 3ff9d756858a8158ae16fd1b9aeb41e20976dbd9 Mon Sep 17 00:00:00 2001 From: Gang Ji Date: Mon, 11 Nov 2024 15:47:53 +0800 Subject: [PATCH] fixup pylint Signed-off-by: Gang Ji --- scripts/yum-plugins/accesstoken.py | 6 +++--- scripts/yum-plugins/xapitoken.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/yum-plugins/accesstoken.py b/scripts/yum-plugins/accesstoken.py index 8e4c32896e..a83d7bf2ce 100644 --- a/scripts/yum-plugins/accesstoken.py +++ b/scripts/yum-plugins/accesstoken.py @@ -11,16 +11,16 @@ # The content of the file referred by the looks like: # { 'token': '...', 'token_id': '...' } +import json from yum import config from yum.plugins import TYPE_CORE -import json import urlgrabber requires_api_version = '2.5' plugin_type = (TYPE_CORE,) -def config_hook(conduit): +def config_hook(conduit): # pylint: disable=unused-argument config.RepoConf.accesstoken = config.UrlOption() def init_hook(conduit): @@ -39,7 +39,7 @@ def init_hook(conduit): continue if not (token['token'] and token['token_id']): - raise Exception("Invalid token or token_id") #pylint: disable=broad-except + raise Exception("Invalid token or token_id") #pylint: disable=broad-exception-raised repo.http_headers['X-Access-Token'] = str(token['token']) repo.http_headers['Referer'] = str(token['token_id']) diff --git a/scripts/yum-plugins/xapitoken.py b/scripts/yum-plugins/xapitoken.py index b93d0435ac..6b959c7446 100644 --- a/scripts/yum-plugins/xapitoken.py +++ b/scripts/yum-plugins/xapitoken.py @@ -11,9 +11,9 @@ # The content of the file referred by the looks like: # { 'xapitoken': '...' } +import json from yum import config from yum.plugins import TYPE_CORE -import json import urlgrabber @@ -39,7 +39,7 @@ def init_hook(conduit): continue if not token['xapitoken']: - raise Exception("Invalid xapitoken") #pylint: disable=broad-except + raise Exception("Invalid xapitoken") #pylint: disable=broad-exception-raised # Only include the xapitoken for repos with a localhost URL, for added safety. # These will be proxied to the remote pool coordinator through stunnel, set up by xapi.