Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions micropip/package_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Any
from urllib.parse import urljoin, urlparse, urlunparse

from ._compat import HttpStatusError, fetch_string_and_headers
from ._compat import fetch_string_and_headers
from ._utils import is_package_compatible, parse_version
from ._vendored.mousebender.simple import from_project_details_html
from ._vendored.packaging.src.packaging.utils import InvalidWheelFilename
Expand Down Expand Up @@ -313,14 +313,9 @@ async def query_package(
logger.debug("Url has no placeholder, appending package name : %r", url)
try:
metadata, headers = await fetch_string_and_headers(url, _fetch_kwargs)
except HttpStatusError as e:
if e.status_code == 404:
logger.debug("NotFound (404) for %r, trying next index.", url)
continue
logger.debug(
"Error fetching %r (%s), trying next index.", url, e.status_code
)
raise
except Exception as e:
logger.debug("Error fetching metadata for %r: %r", url, e)
Comment thread
agriyakhetarpal marked this conversation as resolved.
Outdated
continue

content_type = headers.get("content-type", "").lower()
try:
Expand Down