Skip to content

Commit f634e2d

Browse files
Fix incorrect credentials type for aiohttp
Signed-off-by: Marcel Bochtler <[email protected]>
1 parent a280803 commit f634e2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/python_inspector/utils_pypi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,10 @@ async def get_remote_file_content(
17971797

17981798
auth = None
17991799
if credentials:
1800-
auth = (credentials.get("login"), credentials.get("password"))
1800+
login = credentials.get("login")
1801+
password = credentials.get("password")
1802+
if login and password:
1803+
auth = aiohttp.BasicAuth(login, password)
18011804

18021805
async with aiohttp.ClientSession() as session:
18031806
async with session.get(url, allow_redirects=True, headers=headers, auth=auth) as response:

0 commit comments

Comments
 (0)