Skip to content

Commit

Permalink
Restore docker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
andmat900 committed Oct 14, 2024
1 parent 6d03313 commit 91e9e8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/src/etos_api/library/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ async def authorize(
else:
query[key] = value.strip('"')

if not url:
raise ValueError(f"No realm found in www-authenticate header: {www_auth_header}")
if not isinstance(url, str) or not (
url.startswith("http://") or url.startswith("https://")
):
raise ValueError(f"No realm URL found in www-authenticate header: {www_auth_header}")

async with session.get(url, params=query) as response:
response.raise_for_status()
Expand Down

0 comments on commit 91e9e8d

Please sign in to comment.