Skip to content

Commit

Permalink
catch UnsupportedWheel
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 9, 2023
1 parent da806a5 commit afd5746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pip/_internal/network/lazy_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, HTTPError, Response
from pip._vendor.requests.status_codes import codes

from pip._internal.exceptions import InvalidWheel
from pip._internal.exceptions import InvalidWheel, UnsupportedWheel
from pip._internal.metadata import BaseDistribution, MemoryWheel, get_wheel_distribution
from pip._internal.network.session import PipSession as Session
from pip._internal.network.utils import HEADERS
Expand Down Expand Up @@ -47,7 +47,7 @@ def dist_from_wheel_url(name: str, url: str, session: Session) -> BaseDistributi
wheel = MemoryWheel(zf.name, zf)
# After context manager exit, wheel.name is an invalid file by intention.
return get_wheel_distribution(wheel, canonicalize_name(name))
except BadZipFile:
except (BadZipFile, UnsupportedWheel):
raise InvalidWheel(url, name)


Expand Down

0 comments on commit afd5746

Please sign in to comment.