@@ -39,7 +39,7 @@ class ServiceType(enum.Enum):
39
39
40
40
41
41
async def _basic_auth_registry_request (
42
- app : web .Application , path : str , method : str , ** kwargs
42
+ app : web .Application , path : str , method : str , ** session_kwargs
43
43
) -> Tuple [Dict , Dict ]:
44
44
if not config .REGISTRY_URL :
45
45
raise exceptions .DirectorException ("URL to registry is not defined" )
@@ -60,13 +60,13 @@ async def _basic_auth_registry_request(
60
60
session = app [APP_CLIENT_SESSION_KEY ]
61
61
try :
62
62
async with session .request (
63
- method .lower (), url , auth = auth , ** kwargs
63
+ method .lower (), url , auth = auth , ** session_kwargs
64
64
) as response :
65
65
if response .status == HTTPStatus .UNAUTHORIZED :
66
66
logger .debug ("Registry unauthorized request: %s" , await response .text ())
67
67
# basic mode failed, test with other auth mode
68
68
resp_data , resp_headers = await _auth_registry_request (
69
- url , method , response .headers , session , ** kwargs
69
+ url , method , response .headers , session , ** session_kwargs
70
70
)
71
71
72
72
elif response .status == HTTPStatus .NOT_FOUND :
@@ -173,13 +173,13 @@ async def registry_request(
173
173
path : str ,
174
174
method : str = "GET" ,
175
175
no_cache : bool = False ,
176
- ** kwargs ,
176
+ ** session_kwargs ,
177
177
) -> Tuple [Dict , Dict ]:
178
178
logger .debug (
179
179
"Request to registry: path=%s, method=%s. no_cache=%s" , path , method , no_cache
180
180
)
181
181
return await cache_requests (_basic_auth_registry_request , no_cache )(
182
- app , path , method , ** kwargs
182
+ app , path , method , ** session_kwargs
183
183
)
184
184
185
185
0 commit comments