From c12f6e5b422c4c5043b61f16acc58398a011aec7 Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sun, 12 May 2024 15:55:24 -0400 Subject: [PATCH] Skip invalid wheels --- src/common/hacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/hacks.py b/src/common/hacks.py index 93edcfe..3529f08 100644 --- a/src/common/hacks.py +++ b/src/common/hacks.py @@ -1,6 +1,6 @@ """This module is where I put things that I'm not proud of.""" -from pip._internal.exceptions import UnsupportedWheel +from pip._internal.exceptions import UnsupportedWheel, InvalidWheel from pip._internal.network.lazy_wheel import dist_from_wheel_url from pip._internal.network.session import PipSession @@ -21,6 +21,6 @@ def metadata_from_wheel_url( session = create_session() try: dist = dist_from_wheel_url(name=project_name, url=wheel_url, session=session) - except UnsupportedWheel: + except (UnsupportedWheel, InvalidWheel): return None return dist.read_text("METADATA")